Created
February 26, 2016 19:46
-
-
Save sanzencode/027c1066049f5f78ba9c to your computer and use it in GitHub Desktop.
obstructed logic - workinprogress
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Piece < ActiveRecord::Base | |
belongs_to :game | |
def obstructed_move?(x, y) | |
obstructed_space = a_piece_at_its_space(x, y) | |
return false if obstructed_space.empty? | |
return true if obstructed_space #is not empty | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment