class Cell

Constants

EMPTY
PLAYER_A
PLAYER_B

Attributes

col[R]
row[R]
value[RW]

Public Class Methods

new(row, col, val) click to toggle source
# File lib/fiveinarow/cell.rb, line 10
def initialize(row, col, val)
  @row = row
  @col = col
  @value = val
end

Public Instance Methods

a?() click to toggle source
# File lib/fiveinarow/cell.rb, line 24
def a?
  @value == Cell::PLAYER_A
end
b?() click to toggle source
# File lib/fiveinarow/cell.rb, line 28
def b?
  @value == Cell::PLAYER_B
end
e?() click to toggle source
# File lib/fiveinarow/cell.rb, line 20
def e?
  @value == Cell::EMPTY
end
set(v) click to toggle source
# File lib/fiveinarow/cell.rb, line 16
def set(v)
  @value = v
end