Skip to content

Instantly share code, notes, and snippets.

@AlexNisnevich
Created November 18, 2014 09:05
Show Gist options
  • Save AlexNisnevich/b740c0abc819766971dc to your computer and use it in GitHub Desktop.
Save AlexNisnevich/b740c0abc819766971dc to your computer and use it in GitHub Desktop.
findColumn : Location -> Board -> [Location]
findColumn (x,y) board = (findAbove (x,y) board) ++ (findBelow (x,y) board)
findAbove : Location -> Board -> [Location]
findAbove (x,y) board =
if Dict.member (x,y+1) board
then [(x,y)] ++ findAbove (x,y+1) board
else [(x,y)]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment