From c20fcbf873e466ecd05f659bda66c72d53361746 Mon Sep 17 00:00:00 2001 From: Matuush Date: Sat, 26 Jul 2025 09:32:04 +0200 Subject: [PATCH] Remove trailing whitespaces --- recursive.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/recursive.cpp b/recursive.cpp index 44fa6c6..a68dcb5 100644 --- a/recursive.cpp +++ b/recursive.cpp @@ -86,8 +86,8 @@ struct Block { int x = trg.x, y = trg.y, w = trg.width, h = trg.height; if(depth == 0) leaf = true; else - for(int i = 0; i < 9; i++) - sons[i] = new Block(depth-1, + for(int i = 0; i < 9; i++) + sons[i] = new Block(depth-1, {float(int(x + w/3 * (i%3))), float(int(y + h/3 * (i/3))), float(int(w/3)), float(int(h/3))}); } int change(tile pl) { @@ -132,7 +132,7 @@ struct Block { if(d2 != fr) return d2; bool is_tie = true; - for(Block* s : sons) + for(Block* s : sons) if(s->t == fr) is_tie = false; if(is_tie) return tie; @@ -143,7 +143,7 @@ struct Block { renderImage(t, target); if(leaf || (t != fr && t != tie)) return; - for(int i = 0; i < 9; i++) + for(int i = 0; i < 9; i++) sons[i]->render(depth-1); } Rectangle getRect(deque v) { @@ -158,11 +158,11 @@ struct Block { target = trg; int x = trg.x, y = trg.y, w = trg.width, h = trg.height; if(leaf) return; - for(int i = 0; i < 9; i++) + for(int i = 0; i < 9; i++) sons[i]->updateRect({ - float(int(x + w/3 * (i%3))), - float(int(y + h/3 * (i/3))), - float(int(w/3)), + float(int(x + w/3 * (i%3))), + float(int(y + h/3 * (i/3))), + float(int(w/3)), float(int(h/3)) }); } @@ -194,7 +194,7 @@ void save_state(Block* root, int depth, int time, deque &turn) { outfile << depth << "\n" << time << "\n" << turn.size() << "\n"; for(int play : turn) outfile << play << std::endl; - for(tile t : state) + for(tile t : state) outfile << int(t) << std::endl; } void load_state(Block** root, deque &turn, int &depth, int &time, char* argv) { @@ -227,7 +227,7 @@ void update(int &time, deque &turn, Block* root, Rectangle &dst) { time++; turn.erase(turn.begin()); int rval_2 = root->play(turn, pas(time)); - for(int i = 0; i <= rval_2; i++) + for(int i = 0; i <= rval_2; i++) turn.pop_back(); dst = root->getRect(turn); }