class Gobstones::Position

Attributes

x[R]
y[R]

Public Class Methods

new(x, y) click to toggle source
# File lib/gobstones/position.rb, line 5
def initialize(x, y)
  @x = x
  @y = y
end

Public Instance Methods

==(other) click to toggle source
# File lib/gobstones/position.rb, line 10
def ==(other)
  self.class === other &&
      other.x == @x &&
      other.y == @y
end
Also aliased as: eql?
eql?(other)
Alias for: ==
hash() click to toggle source
# File lib/gobstones/position.rb, line 18
def hash
  @x.hash ^ @y.hash
end