Socket
Socket
Sign inDemoInstall

battleship-types

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

battleship-types - npm Package Compare versions

Comparing version 1.0.13 to 1.0.14

15

index.d.ts

@@ -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 @@

2

package.json
{
"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",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc