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 |