Example #1
0
 public static BishopMoves Get()
 {
     if (instance == null)
     {
         instance = new BishopMoves();
     }
     return(instance);
 }
Example #2
0
        private static Moves Create(PieceEnum piece)
        {
            switch (piece)
            {
            case PieceEnum.Knight:
                return(KnightMoves.Get());

            case PieceEnum.Bishop:
                return(BishopMoves.Get());

            case PieceEnum.Rook:
                return(RookMoves.Get());

            case PieceEnum.Queen:
                return(QueenMoves.Get());

            case PieceEnum.King:
                return(KingMoves.Get());

            case PieceEnum.Pawn:
                return(PawnMoves.Get());
            }
            return(null);
        }