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 authored and wolfwood committed Sep 27, 2010
1 parent 44817f2 commit 17fda9d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion behind.hs
Expand Up @@ -113,7 +113,7 @@ drawWorld (MakeWorld board (Player name hp (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 17fda9d

Please sign in to comment.