public CommandSetPosition(CreatePositionData data) { if (data == null) { throw new ArgumentNullException(); } m_data = data; }
public static Position.Position GetPosition(CreatePositionData desc) { // TODO var result = new Position.Position(); result.Reset( new PlayerPieceSet(desc.m_pieces, Players.White), new PlayerPieceSet(desc.m_pieces, Players.Black), desc.m_player_to_move, desc.m_white_castling_options, desc.m_black_castling_options, desc.m_capture_en_passant_column, desc.m_fullmove_number, desc.m_halfmove_clock); return result; }
public IReadOnlyPosition CreatePosition(CreatePositionData desc) { if (PositionValidator.Validate(desc.m_pieces, desc.m_player_to_move) != PositionValidator.ErrorCodes.NoError) { throw new NotImplementedException(); } return MemoryPool.GetPosition(desc); }