Skip to content

Commit

Permalink
Fixed hasWon so you can actually win when you are supposed to.
Browse files Browse the repository at this point in the history
  • Loading branch information
steveklabnik committed Sep 25, 2010
1 parent 9c87630 commit 4b59493
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion behind.hs
Expand Up @@ -95,7 +95,7 @@ drawWorld (MakeWorld board (Player _ _ (x,y))) = do
refresh

hasWon :: World -> Bool
hasWon (MakeWorld board (Player _ _ (x,y))) = board !! x !! y == Goal
hasWon (MakeWorld board (Player _ _ (x,y))) = board !! y !! x == Goal

gameLoop :: Int -> World -> IO World
gameLoop n w
Expand Down

0 comments on commit 4b59493

Please sign in to comment.