public void Place(TakPiece piece) { if (Size != 0) { throw new Exception("Cannot place a piece on a non-empty stack"); } else { Pieces.Add(piece); } }
private void ApplyPlace(GameState game) { TakPiece piece; if (Piece == TakPiece.PieceType.Capstone) { game[PieceColor].NumCapstones--; piece = new Capstone(PieceColor); } else { game[PieceColor].NumPieces--; piece = new TakPiece(PieceColor) { IsWall = Piece == TakPiece.PieceType.Wall }; } game.Board[Row, Column].Place(piece); }
public TakPiece(TakPiece src) { Color = src.Color; IsWall = src.IsWall; }