Skip to content

Instantly share code, notes, and snippets.

Avatar

Sandra Harrasser sanzencode

View GitHub Profile
@sanzencode
sanzencode / piece.rb
Created Feb 26, 2016
obstructed logic - workinprogress
View piece.rb
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