internal void DoPromotion(byte position, ZNPieceType newType) { ZNPiece piece = piecesInternal[position]; if (piece.Type != ZNPieceType.EPawn) { throw new ArgumentException("This is not a pawn!"); } piecesInternal[position] = new ZNPiece(piece.Color, newType, position); }
internal bool DoMove(short move) { byte oldPosition = (byte)(move & 0xff00 >> 2); byte newPosition = (byte)(move & 0x00ff); ZNPiece piece = piecesInternal[oldPosition]; piecesInternal[oldPosition] = EMPTY; piecesInternal[newPosition] = piece; return(true); }