feat: add player methods

This commit is contained in:
Smigz 2024-03-15 20:49:39 -04:00
parent 904c4901da
commit 718fdf63b1
4 changed files with 34 additions and 1 deletions

View file

@ -0,0 +1,18 @@
import { Gameboard } from '../src/components/gameboard';
class Player {
constructor(name) {
this.gameboard = new Gameboard();
this.playerName = name;
}
}
let p = new Player('Player1');
it('should contain a gameboard', () => {
expect(p.gameboard).toHaveProperty(
'ships',
'scoreboard',
'shipCount',
'sunkShipCount',
);
});