15 lines
No EOL
218 B
TypeScript
15 lines
No EOL
218 B
TypeScript
class Cell {
|
|
}
|
|
|
|
class Ship {
|
|
isSunk: boolean;
|
|
}
|
|
|
|
class Board {
|
|
ships: Ship[];
|
|
cells: Cell[];
|
|
|
|
private allShipsSunk() {
|
|
return this.ships.every(function (val) { return val.isSunk; });
|
|
}
|
|
} |