struct Board

Defined in:

AI2048/board.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(board : StaticArray(Int32, 16) = StaticArray(Int32, 16).new(0)) #

[View source]

Instance Method Detail

def ==(b : Board) #

[View source]
def ==(b : StaticArray(Int32, 16)) #

[View source]
def [](row, col) #

[View source]
def [](tile_number) #

[View source]
def []=(row, col, value) #

[View source]
def []=(tile_number, value) #

[View source]
def board : StaticArray(Int32, 16) #

[View source]
def board=(board : StaticArray(Int32, 16)) #

[View source]
def can_move?(opcode) #

[View source]
def can_move_down? #

[View source]
def can_move_left? #

[View source]
def can_move_right? #

[View source]
def can_move_up? #

[View source]
def clear #

[View source]
def each #

[View source]
def move!(opcode) #

[View source]
def move_down! #

[View source]
def move_left! #

[View source]
def move_right! #

[View source]
def move_up! #

[View source]
def reflect_horizonal! #

[View source]
def reflect_vertical! #

[View source]
def rotate_left! #

[View source]
def rotate_right! #

[View source]
def size #

[View source]
def to_s(io) #

[View source]
def to_slice #

[View source]
def transpose! #

[View source]
def transpose2! #

[View source]
def unsafe_at(index : Int) #

[View source]