Skip to content

Commit 495b949

Browse files
committed
use less code
1 parent 7f38e6d commit 495b949

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

posts/visualizing-chess-bitboards.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ Without bitboards, a program has to perform many more (magnitudes more!) instruc
6060

6161
```js
6262
attacks = [];
63-
for (let i = 0; i < 64; i++) {
64-
let piece = board.getPiece(i);
63+
for (i = 0; i < 64; i++) {
64+
piece = board.getPiece(i);
6565
if (piece === "P") { // White pawn
6666

6767
// Check left attack (forward-left)

0 commit comments

Comments
 (0)