From 57579fa5e4f4945614d0729af1b60575de693030 Mon Sep 17 00:00:00 2001 From: Sidharth Kulkarni Date: Sat, 9 May 2026 20:16:48 -0700 Subject: [PATCH] fix makeMove --- src/Game.hs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) 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