Skip to content

Commit

Permalink
Printed move before next state
Browse files Browse the repository at this point in the history
  • Loading branch information
Jamie Ly committed Nov 10, 2012
1 parent 26be8a2 commit 2e7b1c0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Main.hs
Expand Up @@ -15,7 +15,9 @@ playGame game = do
if strMove == "q"
then putStrLn "Quitting game..."
else if isValidMove (getMove strMove)
then playGame $ applyMove game strMove
then do
putStrLn $ "Applying move " ++ strMove
playGame $ applyMove game strMove
else putStrLn $ strMove ++ " is not a valid move"
finishGame = do
putStrLn $ "The game is over. Final game state: \n" ++ show game
Expand Down

0 comments on commit 2e7b1c0

Please sign in to comment.