Skip to content

Commit 605d6b1

Browse files
authored
Merge pull request #39 from AleNavarini/fix/connect4-horizontal-win
Fix horizontal win case in connect 4
2 parents e0cd7b5 + a1bb2a7 commit 605d6b1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

technical-fundamentals/coding/__tests__/connect4.test.mjs

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ describe("Connect4", () => {
1818
it("it should detect horizontal winning", () => {
1919
const c4 = new Connect4({ width: 10, height: 10 });
2020
for (let i = 0; i < 4; i++) {
21-
c4.play(1);
22-
c4.play(1);
21+
c4.play(i);
22+
c4.play(i);
2323
}
2424
expect(c4.winner()).toEqual(PLAYER_ONE);
2525
});

0 commit comments

Comments
 (0)