import { Board, createGame, Game, Hole, Store } from "../src/mancala" describe('mancala', function () { const player1 = "0" const player2 = "0" it('turn test', function () { const game = createGame(player1, player2) game.turn = "player1" game.moveByIndex(3, "player1") expect(game.turn).toBe("player1") }) it('zero hole test 1', function () { const board = new Board( [new Hole(0), new Hole(1), new Hole(2), new Hole(3), new Hole(4), new Hole(5)], [new Hole(1), new Hole(0), new Hole(4), new Hole(4), new Hole(4), new Hole(4)], new Store(0), new Store(0)) const game = new Game(player1, player2, board, "player2") game.moveByIndex(0, "player2") expect(game.turn).toBe("player1") expect(game.board.player2Store.ballCount).toBe(5) expect(game.board.player1Holes[game.board.player1Holes.length - 1 - 1].ballCount).toBe(0) }) })