Skip to content

Commit a4de136

Browse files
committed
cln: redundant var
1 parent f08ee9b commit a4de136

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

webzebra/src/main.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ document.getElementById('board')?.addEventListener('click', (e) => {
138138
function render() {
139139
let evals_ = []
140140
const fieldSize = 100
141-
const arr = [] as Circle[]
141+
const circles = [] as Circle[]
142142
for (let i = 1; i <= 8; i++) {
143143
for (let j = 1; j <= 8; j++) {
144144
let color;
@@ -181,7 +181,7 @@ function render() {
181181
}
182182

183183
const pieceSize = 80
184-
arr.push({
184+
circles.push({
185185
cx: (j - 1) * fieldSize + 0.5 * fieldSize,
186186
cy: (i - 1) * fieldSize + 0.5 * fieldSize,
187187
r: pieceSize / 2,
@@ -190,8 +190,6 @@ function render() {
190190
}
191191
}
192192

193-
const circles = arr
194-
195193
// todo this is slow, use something better when we use some more efficient board representation
196194
const score_white = circles.reduce((count: number, circle: Circle) => circle.color === 'white' ? count + 1 : count, 0)
197195
const score_black = circles.reduce((count: number, circle: Circle) => circle.color === 'black' ? count + 1 : count, 0)

0 commit comments

Comments
 (0)