Skip to content

Instantly share code, notes, and snippets.

@pumpkincouture
Created August 4, 2014 03:23
Show Gist options
  • Save pumpkincouture/cb04f2e942f7b31e05c2 to your computer and use it in GitHub Desktop.
Save pumpkincouture/cb04f2e942f7b31e05c2 to your computer and use it in GitHub Desktop.
def open_spaces(board)
spaces=[]
board.cells.each do |k, v|
spaces << k if board.cells[k]!= "X" && board.cells[k]!="O"
end
spaces
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment