diff --git a/src/Game.hs b/src/Game.hs index fc5b2e2..7898976 100644 --- a/src/Game.hs +++ b/src/Game.hs @@ -10,7 +10,11 @@ makeMove :: (GameMode mode) => PlayerIndex -> BoardAction -> GameState mode -> G makeMove (MkPlayerIndex idx) (SelectSquare topLeft bottomRight) state@MkGameState{board} = let tiles = select topLeft bottomRight board gMode = gameMode board - in if check gMode tiles - then - over (#players % (ix idx) % #score) (+ 1) state - else state + transform = + if check gMode tiles + -- add one to player score + -- TODO: add the proper score here + then over (#players % (ix idx) % #score) (+ 1) + -- invalid move, do nothing + else id + in transform state