File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -138,7 +138,7 @@ document.getElementById('board')?.addEventListener('click', (e) => {
138
138
function render ( ) {
139
139
let evals_ = [ ]
140
140
const fieldSize = 100
141
- const arr = [ ] as Circle [ ]
141
+ const circles = [ ] as Circle [ ]
142
142
for ( let i = 1 ; i <= 8 ; i ++ ) {
143
143
for ( let j = 1 ; j <= 8 ; j ++ ) {
144
144
let color ;
@@ -181,7 +181,7 @@ function render() {
181
181
}
182
182
183
183
const pieceSize = 80
184
- arr . push ( {
184
+ circles . push ( {
185
185
cx : ( j - 1 ) * fieldSize + 0.5 * fieldSize ,
186
186
cy : ( i - 1 ) * fieldSize + 0.5 * fieldSize ,
187
187
r : pieceSize / 2 ,
@@ -190,8 +190,6 @@ function render() {
190
190
}
191
191
}
192
192
193
- const circles = arr
194
-
195
193
// todo this is slow, use something better when we use some more efficient board representation
196
194
const score_white = circles . reduce ( ( count : number , circle : Circle ) => circle . color === 'white' ? count + 1 : count , 0 )
197
195
const score_black = circles . reduce ( ( count : number , circle : Circle ) => circle . color === 'black' ? count + 1 : count , 0 )
You can’t perform that action at this time.
0 commit comments