Class Square
In: lib/bangkok/square.rb
Parent: Object

Represents a location on the board. Immutable.

Methods

==   at   distance_to   new   on_board?   to_s  

Constants

SQUARES = []
OFF_BOARD = Square.new

Attributes

color  [R] 
file  [R] 
rank  [R] 

Public Class methods

Public Instance methods

Return the distance between this square and the other. Returns nil of eithr square is off the board.

[Validate]