Exemplo n.º 1
0
    public void Init(ChessPieceColor pieceColor, ChessPieceRank pieceRank)
    {
        piece = new Piece(pieceColor, pieceRank);

        startingGridPosition = GameUtils.GetStartingGridPosition(piece);
        gfx.Init(piece);
        move.Init(piece);
        Move(startingGridPosition);
    }
Exemplo n.º 2
0
    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);
    }
Exemplo n.º 3
0
 public Piece(ChessPieceColor c, ChessPieceRank r)
 {
     _color = c;
     _rank  = r;
 }