import { expect } from 'chai';
import { playGame } from '../dice.js';
describe('Dice Game', function () {
it('Game starts with player one.', function () {
expect(game.player).to.equal(1);
it('Game rolls three dice.', function () {
expect(game.numberOfDice).to.equal(3);
it('Keeps the highest of the three dice in a running tally.', function () {
expect(game.turnScore).exists;
expect(game.turnScore).to.be.below(7);
it('Keeps the highest of the two dice in a running tally.', function () {
expect(game.numberOfDice).to.equal(3);
var game = playGame(game);
expect(game.numberOfDice).to.equal(2);
expect(game.turnScore).exists;
it('Keeps the highest of the last dice in a running tally.', function () {
expect(game.numberOfDice).to.equal(3);
var game = playGame(game);
expect(game.numberOfDice).to.equal(2);
var game = playGame(game);
expect(game.numberOfDice).to.equal(1);
expect(game.turnScore).exists;
it('Changes turn after the first player rolls 3 times.', function () {
expect(game.player).to.equal(1);
var game = playGame(game);
var game = playGame(game);
expect(game.player).to.equal(2);