public static PawnMoves Get() { if (instance == null) { instance = new PawnMoves(); } return(instance); }
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); }