Skip to content

Commit

Permalink
Update board_drawer.js
Browse files Browse the repository at this point in the history
  • Loading branch information
rooklift committed May 28, 2022
1 parent 14510b2 commit 360af9a
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions src/modules/board_drawer.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,16 +105,17 @@ let board_drawer_prototype = {

if (width !== this.width || height !== this.height) {

for (let x = 0; x < 19; x++) {
for (let y = 0; y < 19; y++) {
this.hoshi_points[x][y] = false;
for (let x = 0; x < 19; x++) {
for (let y = 0; y < 19; y++) {
this.hoshi_points[x][y] = false;
}
}
}

for (let s of handicap_stones(Math.min(width, height) > 13 ? 9 : 5, width, height, false)) {
let x = s.charCodeAt(0) - 97;
let y = s.charCodeAt(1) - 97;
this.hoshi_points[x][y] = true;
for (let s of handicap_stones(Math.min(width, height) > 13 ? 9 : 5, width, height, false)) {
let x = s.charCodeAt(0) - 97;
let y = s.charCodeAt(1) - 97;
this.hoshi_points[x][y] = true;
}
}

// Obviously we want to save the width / height / square_size... but we also save the state of relevant
Expand Down

0 comments on commit 360af9a

Please sign in to comment.