parent
de02c7113f
commit
fb4bc5bb36
12 changed files with 158 additions and 9 deletions
|
@ -7,7 +7,8 @@ data Game = Game {
|
|||
-- Current state of the game
|
||||
state :: State,
|
||||
playing :: Level,
|
||||
levels :: [Level]
|
||||
levels :: [Level],
|
||||
player :: Player
|
||||
}
|
||||
|
||||
------------------------------- Level --------------------------------
|
||||
|
@ -30,9 +31,13 @@ data Physical = Void
|
|||
|
||||
------------------------------- Player -------------------------------
|
||||
|
||||
type X = Int
|
||||
type Y = Int
|
||||
|
||||
data Player = Player {
|
||||
playerHp :: Maybe Int,
|
||||
inventory :: [Item]
|
||||
inventory :: [Item],
|
||||
coord :: (X, Y)
|
||||
} deriving (Eq, Show)
|
||||
|
||||
instance Living Player where
|
||||
|
|
Reference in a new issue