class Cell

Attributes

column[R]
row[R]
search_paths[R]
state[RW]

Each spot on the board is represented by a cell object, which contains the state of that spot

(e.g. empty, player1, player2)

Public Class Methods

new(args) click to toggle source
# File lib/connect_four.rb, line 8
def initialize(args)
        @state = " " #available to have a move made in it.
        @row = args[:row] #set at initialization
        @column = args[:column] #set at initialization
        @search_paths = [] #will become set based on position on the board.
end

Public Instance Methods

add_search_path(path) click to toggle source
# File lib/connect_four.rb, line 15
def add_search_path(path)
        @search_paths << path
end