code vs. zombies 100%
This commit is contained in:
34
code_vs_zombies/src/ffi/Reader.purs
Normal file
34
code_vs_zombies/src/ffi/Reader.purs
Normal file
@@ -0,0 +1,34 @@
|
||||
module Reader where
|
||||
|
||||
import Effect (Effect)
|
||||
|
||||
type Player =
|
||||
{ x :: Int
|
||||
, y :: Int
|
||||
}
|
||||
|
||||
type Human =
|
||||
{ id :: Int
|
||||
, x :: Int
|
||||
, y :: Int
|
||||
}
|
||||
|
||||
type Zombie =
|
||||
{ id :: Int
|
||||
, x :: Int
|
||||
, y :: Int
|
||||
, nextX :: Int
|
||||
, nextY :: Int
|
||||
}
|
||||
|
||||
type GameInput =
|
||||
{ player :: Player
|
||||
, humanCount :: Int
|
||||
, zombieCount :: Int
|
||||
, humans :: Array Human
|
||||
, zombies :: Array Zombie
|
||||
}
|
||||
|
||||
foreign import parseInput :: Effect GameInput
|
||||
|
||||
foreign import readline :: Effect String
|
||||
Reference in New Issue
Block a user