Skip to content

Commit

Permalink
Merge 9978e71 into 46aba1d
Browse files Browse the repository at this point in the history
  • Loading branch information
Piterden committed Feb 10, 2021
2 parents 46aba1d + 9978e71 commit 847633f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/board.js
Expand Up @@ -107,11 +107,11 @@ export class Board extends EventEmitter {
return arr.reduce((acc, cur) => {
if (!isNaN(Number(cur))) {
for (let i = 0; i < Number(cur); i += 1) {
acc.push(Square.create('abcdefgh'[file], rank + 1));
acc.push(Square.create('abcdefgh'[file], 8 - rank));
file = file < 7 ? file + 1 : 0;
}
} else {
const square = Square.create('abcdefgh'[file], rank + 1);
const square = Square.create('abcdefgh'[file], 8 - rank);
square.piece = Piece[pieces[cur].method](pieces[cur].arg);
acc.push(square);
file = file < 7 ? file + 1 : 0;
Expand Down

0 comments on commit 847633f

Please sign in to comment.