Battleship (#16)

* project: testing

* feat: updated testing configs

* feat: ship class and test

* feat: more testing

* feat: gameboard logic/tests complete

* feat: add player methods

* feat: add main app

* sync: pushing latest code to repo

* feat: add some basic styling and stuff

* feat: added UI logic

* feat: basic game is finished

* feat: add adjacent rules

* feat: basic game complete
This commit is contained in:
Smigz 2024-04-02 16:45:56 -04:00 committed by GitHub
parent d899a773bd
commit 099e6b13e7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
23 changed files with 10431 additions and 9218 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',
);
});