module Chess::Move

Extended Modules

Defined in:

chess/move.cr

Constant Summary

BishopCapturePromotion = 7
BishopPromotion = 6
BlackKingSideCastle = new_move(Square::E8, Square::G8, Piece::King, Piece::None, KingCastle)
BlackQueenSideCastle = new_move(Square::E8, Square::C8, Piece::King, Piece::None, QueenCastle)
Capture = 1
DoublePawnPush = 8
EPCapture = 9
KingCastle = 4
KnightCapturePromotion = 3
KnightPromotion = 2
NullMove = 0
QueenCapturePromotion = 15
QueenCastle = 12
QueenPromotion = 14
QuietMove = 0
RookCapturePromotion = 11
RookPromotion = 10
WhiteKingSideCastle = new_move(Square::E1, Square::G1, Piece::King, Piece::None, KingCastle)
WhiteQueenSideCastle = new_move(Square::E1, Square::C1, Piece::King, Piece::None, QueenCastle)

Instance Method Summary

Instance Method Detail

def captured_piece(m) #

[View source]
def from(m) #

[View source]
def is_capture?(m) #

[View source]
def is_capture_or_promotion?(m) #

[View source]
def is_castling?(m) #

[View source]
def is_normal?(m) #

Either quiete move or capture


[View source]
def is_promotion?(m) #

[View source]
def moved_piece(m) #

[View source]
def new_move(from : Number, to : Number, piece_type, captured_type, move_type) : Int32 #

[View source]
def new_move(from : Square, to : Square, piece_type, captured_type, move_type) : Int32 #

[View source]
def new_type(capture, promotion, s1, s0) #

[View source]
def special(m) #

[View source]
def to(m) #

[View source]
def type(m) #

[View source]