Skip to content

Commit

Permalink
Final (HA) update to benchmark
Browse files Browse the repository at this point in the history
  • Loading branch information
Jumbub committed Sep 29, 2021
1 parent 0b3ed0e commit 9227c6a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion results/benchmark.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
Benchmark Time CPU Iterations
----------------------------------------------------------------------------
BM_NextBoard/min_time:5.000 245 ms 245 ms 29
BM_RenderNextBoard/min_time:5.000 259 ms 259 ms 27
BM_RenderNextBoard/min_time:5.000 259 ms 258 ms 27
6 changes: 4 additions & 2 deletions src/board/generate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,10 @@ Board benchmarkBoard(int width, int height) {
if (x >= width / 2)
board[y][x] = (x / 8) % 2 != (y / 8) % 2;
} else {
if (y < BREEDER_HEIGHT && x < BREEDER_WIDTH) {
board[y][x] = BREEDER[y][x];
const int breederMarginY = (height / 2 - BREEDER_HEIGHT) / 2;
const int breederY = y - breederMarginY;
if (breederY > 0 && breederY < BREEDER_HEIGHT && x < BREEDER_WIDTH) {
board[y][x] = BREEDER[breederY][x];
} else {
board[y][x] = false;
}
Expand Down

0 comments on commit 9227c6a

Please sign in to comment.