bool possible_capture_from_motion(const GameState &gs, const Step& step_taken) { const unsigned char finish = step_taken.get_finish(); const bool moved_onto_capture = Board::is_capture_idx(finish); if (moved_onto_capture) return true; const bool started_adj_to_capture = Board::is_adj_capture_squares(step_taken.get_position()); if (started_adj_to_capture) return true; return false; }
bool GameState::move_piece(const Step &s) { assert(s.is_motion()); const uint8_t c = s.get_color(), p = s.get_piece(), pos = s.get_position(), finish = s.get_finish(); return move_piece(c, p, pos, finish); }
bool GameState::add_piece_at(const Step &s) { return add_piece_at(s.get_color(), s.get_piece(), s.get_position()); }