| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell98 |
Game.Board.BasicTurnGame
Documentation
data GameChange index player piece Source
Constructors
| AddPiece (index, index) player piece | |
| RemovePiece (index, index) | |
| MovePiece (index, index) (index, index) |
getPieceAt :: Ix index => GameState index tile player piece -> (index, index) -> Maybe (player, piece) Source
data GameState index tile player piece Source
Constructors
| GameState | |
Fields
| |
class PlayableGame a index tile player piece | a -> index, a -> tile, a -> player, a -> piece where Source
Methods
curPlayer :: a -> player Source
allPieces :: a -> [(index, index, player, piece)] Source
allPos :: a -> [(index, index, tile)] Source
moveEnabled :: a -> Bool Source
canMove :: a -> player -> (index, index) -> Bool Source
canMoveTo :: a -> player -> (index, index) -> (index, index) -> Bool Source
move :: a -> player -> (index, index) -> (index, index) -> [GameChange index player piece] Source
activateEnabled :: a -> Bool Source
canActivate :: a -> player -> (index, index) -> Bool Source
activate :: a -> player -> (index, index) -> [GameChange index player piece] Source
applyChange :: a -> GameChange index player piece -> a Source
applyChanges :: a -> [GameChange index player piece] -> a Source