Skip to content

Commit efff9ee

Browse files
authored
Merge pull request #20 from yy214123/optimize-spatial-locality
Reorder win-checks to improve performance
2 parents 46ad350 + 66ca663 commit efff9ee

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

game.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44

55

66
const line_t lines[4] = {
7-
{1, 0, 0, 0, BOARD_SIZE - GOAL + 1, BOARD_SIZE}, // COL
87
{0, 1, 0, 0, BOARD_SIZE, BOARD_SIZE - GOAL + 1}, // ROW
8+
{1, 0, 0, 0, BOARD_SIZE - GOAL + 1, BOARD_SIZE}, // COL
99
{1, 1, 0, 0, BOARD_SIZE - GOAL + 1, BOARD_SIZE - GOAL + 1}, // PRIMARY
1010
{1, -1, 0, GOAL - 1, BOARD_SIZE - GOAL + 1, BOARD_SIZE}, // SECONDARY
1111
};

0 commit comments

Comments
 (0)