Skip to content

Commit

Permalink
fix some merge errors and extra whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
RainRat committed Jul 5, 2024
1 parent 11bd44e commit 5e6b2de
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/position.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ Position& Position::set(const Variant* v, const string& fenStr, bool isChess960,

int commitFile = 0;
int rank = 0;

// 1. Piece placement
while ((ss >> token) && !isspace(token))
{
Expand Down
4 changes: 3 additions & 1 deletion src/position.h
Original file line number Diff line number Diff line change
Expand Up @@ -1465,7 +1465,7 @@ inline Bitboard Position::moves_from(Color c, PieceType pt, Square s) const {
// Add initial moves
if (double_step_region(c, pt) & s)
b |= moves_bb<true>(c, movePt, s, byTypeBB[ALL_PIECES]);

// Xiangqi soldier
if (pt == SOLDIER && !(promoted_soldiers(c) & s))
b &= file_bb(file_of(s));
Expand Down Expand Up @@ -1837,6 +1837,7 @@ inline bool Position::has_exchange() const {

inline PieceSet Position::rescueFor(PieceType pt) const {
return var->hostageExchange[pt];
}

//Returns the pieces that are not moved (including newly added pieces during the game, i.e. DROPS) of a side
inline Bitboard Position::not_moved_pieces(Color c) const {
Expand All @@ -1846,6 +1847,7 @@ inline Bitboard Position::not_moved_pieces(Color c) const {
//Returns the places of wall squares
inline Bitboard Position::wall_squares() const {
return this->st->wallSquares;
}

inline void Position::commit_piece(Piece pc, File fl){
committedGates[color_of(pc)][fl] = type_of(pc);
Expand Down
2 changes: 1 addition & 1 deletion src/uci.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -586,7 +586,7 @@ Move UCI::to_move(const Position& pos, string& str) {

for (const auto& m : MoveList<LEGAL>(pos)) {
auto move_str = UCI::move(pos, m);

// special processing of optional gating suffix from xboard
// like "b1c3o" => "b1c3"
if (CurrentProtocol == XBOARD && str.length() == 5 && move_str.length() == 4) {
Expand Down

0 comments on commit 5e6b2de

Please sign in to comment.