- for (let step of [[-1,0],[1,0],[0,-1],[0,1]])
- {
- let [i,j] = [x+step[0],y+step[1]];
- while (V.OnBoard(i,j))
- {
- if (this.board[i][j] != V.EMPTY)
- {
+ for (let step of [
+ [-1, 0],
+ [1, 0],
+ [0, -1],
+ [0, 1]
+ ]) {
+ let [i, j] = [x + step[0], y + step[1]];
+ while (V.OnBoard(i, j)) {
+ if (this.board[i][j] != V.EMPTY) {