Skip to content

Commit 2d7b591

Browse files
committed
Apply clang-format
1 parent 381978a commit 2d7b591

2 files changed

Lines changed: 13 additions & 12 deletions

File tree

eval.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -96,13 +96,13 @@ Value eg_king_table[64] = {-74, -35, -18, -18, -11, 15, 4, -17, -12, 17, 14,
9696
23, 16, 7, -9, -27, -11, 4, 13, 14, 4, -5,
9797
-17, -53, -34, -21, -11, -28, -14, -24, -43};
9898

99-
Value *mg_pesto_table[] = {
100-
nullptr, mg_pawn_table, mg_knight_table, mg_bishop_table,
101-
mg_rook_table, mg_queen_table, mg_king_table};
99+
Value *mg_pesto_table[] = {nullptr, mg_pawn_table, mg_knight_table,
100+
mg_bishop_table, mg_rook_table, mg_queen_table,
101+
mg_king_table};
102102

103-
Value *eg_pesto_table[] = {
104-
nullptr, eg_pawn_table, eg_knight_table, eg_bishop_table,
105-
eg_rook_table, eg_queen_table, eg_king_table};
103+
Value *eg_pesto_table[] = {nullptr, eg_pawn_table, eg_knight_table,
104+
eg_bishop_table, eg_rook_table, eg_queen_table,
105+
eg_king_table};
106106

107107
Value eval(const chess::Board &board) {
108108
int pieceCount[10] = {

search.cpp

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -131,21 +131,22 @@ Value doSearch(Board board, int depth, Value alpha, Value beta,
131131
Move move = moves[i];
132132
int reduction = (i >= 3 && depth >= 3 && !board.isCapture(move)) ? 1 : 0;
133133
board.doMove(move);
134-
Value childScore = doSearch(board, depth - 1 - reduction, -alpha - 1, -alpha, session, ply + 1);
135-
if (childScore == VALUE_NONE){
134+
Value childScore = doSearch(board, depth - 1 - reduction, -alpha - 1,
135+
-alpha, session, ply + 1);
136+
if (childScore == VALUE_NONE) {
136137
board.undoMove();
137138
return VALUE_NONE;
138139
}
139140
Value score = -childScore;
140141
if (reduction > 0 && score > alpha) {
141142
childScore = doSearch(board, depth - 1, -beta, -alpha, session, ply + 1);
142143
board.undoMove();
143-
if (childScore == VALUE_NONE) return VALUE_NONE;
144+
if (childScore == VALUE_NONE)
145+
return VALUE_NONE;
144146
score = -childScore;
145-
}
146-
else
147+
} else
147148
board.undoMove();
148-
149+
149150
if (score > maxScore) {
150151
maxScore = score;
151152
update_pv(session.pv[ply], move, session.pv[ply + 1]);

0 commit comments

Comments
 (0)