Changeset 20244 for lang/haskell

Show
Ignore:
Timestamp:
09/30/08 08:02:25 (7 weeks ago)
Author:
mokehehe
Message:

落下チェックで床を2点見るように

Location:
lang/haskell/nario
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • lang/haskell/nario/Event.hs

    r20243 r20244  
    33 
    44import Const 
     5import Field 
    56 
    67data Event = 
    78                EvHitBlock ImageType Int Int 
    8         |       EvSetField Int Int Char 
     9        |       EvSetField Int Int Cell 
  • lang/haskell/nario/Field.hs

    r20243 r20244  
    88module Field ( 
    99        Field, 
     10        Cell, 
    1011        loadField, 
    1112        fieldRef, 
  • lang/haskell/nario/Player.hs

    r20243 r20244  
    147147        | otherwise     = player { stand = stand' } 
    148148        where 
    149                 stand' = isGround $ y player 
     149                stand' 
     150                        | vy player >= 0        = isGround (-6) || isGround 5 
     151                        | otherwise                     = stand player 
    150152                ystand = (cellCrd $ y player) * (chrSize * one) 
    151153 
    152                 isGround y = isBlock $ fieldRef fld (cellCrd $ x player) (cellCrd y) 
     154                isGround ofsx = isBlock $ fieldRef fld (cellCrd $ x player + ofsx * one) (cellCrd (y player)) 
    153155 
    154156-- 上をチェック