public void Init(ChessPieceColor pieceColor, ChessPieceRank pieceRank) { piece = new Piece(pieceColor, pieceRank); startingGridPosition = GameUtils.GetStartingGridPosition(piece); gfx.Init(piece); move.Init(piece); Move(startingGridPosition); }
public static string GetPieceRankText(ChessPieceRank pieceRank) { switch (pieceRank) { case ChessPieceRank.PAWN: return("PAWN"); case ChessPieceRank.BISHOP: return("BISHOP"); case ChessPieceRank.KNIGHT: return("KNIGHT"); case ChessPieceRank.ROOK: return("ROOK"); } return(null); }
public Piece(ChessPieceColor c, ChessPieceRank r) { _color = c; _rank = r; }