[four-in-a-row] Small code improvement.
- From: Arnaud B. <arnaudb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [four-in-a-row] Small code improvement.
- Date: Mon, 23 Dec 2019 03:01:55 +0000 (UTC)
commit 7a983a23d6b16256e8b219cf8e1bad00fc01f467
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date: Mon Dec 23 04:01:44 2019 +0100
Small code improvement.
src/game-board.vala | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
---
diff --git a/src/game-board.vala b/src/game-board.vala
index b5bf172..b953170 100644
--- a/src/game-board.vala
+++ b/src/game-board.vala
@@ -102,9 +102,7 @@ private class Board : Object
col_1 = col_1 - 1;
while (col_2 < BOARD_ROWS && gboard [row, col_2 + 1] == tile)
col_2 = col_2 + 1;
- if (col_2 - col_1 >= 3)
- return true;
- return false;
+ return col_2 - col_1 >= 3;
}
private inline bool is_vline_at (PlayerID tile, uint8 row, uint8 col,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]