battleship-types
Advanced tools
Comparing version 1.0.13 to 1.0.14
@@ -10,2 +10,9 @@ // Type definitions for battleship-types 1.0 | ||
*/ | ||
export interface ITurn { | ||
id: number | ||
player: IPlayer | ||
guess: Location | ||
result: PointStatus | ||
} | ||
export interface IGame { | ||
@@ -16,5 +23,10 @@ playerBoard: IBoard, | ||
opponent: IPlayer, | ||
public turns: ITurn[] = [] | ||
public winner: IPlayer | null = null | ||
play(): void | ||
addTurn(turn: ITurn): ITurn[] | ||
declareWinner(player: IPlayer): void | ||
} | ||
/** | ||
@@ -57,5 +69,6 @@ * Board | ||
allShipsDestroyed: boolean | ||
guessedSpaces: Map<Location, PointStatus> | ||
placeShip(ship: IShip, location: Location): void | ||
receiveGuess(location: Location): PointStatus | ||
makeGuess(location: Location, opponent: IPlayer): PointStatus | ||
makeGuess(location: Location, opponent: IPlayer): ITurn | ||
} | ||
@@ -62,0 +75,0 @@ |
{ | ||
"name": "battleship-types", | ||
"version": "1.0.13", | ||
"version": "1.0.14", | ||
"description": "TypeScript type definitions for the game of Battleship.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
3022
89
0