This is a single-player version of Battleship, a popular strategy naval war game. You as the player may shoot at the opponent ships, but the opponent never shoots back.
The game is available at https://battleship.deno.dev.
Install Deno CLI version 1.31.0 or higher.
From within the project folder, start the game using this command:
deno task start
Now open http://localhost:8000 in your browser to view the game.
By default, the game is configured to use 10x10 grid and three ships. The
settings can be adjusted by modifying the ./game/config.ts
file. An example of
alternative configuration:
/** Size of the battlefield */
export const GRID_SIZE = 8;
/** Available ships on the battlefield */
export const SHIPS = [7, 4, 3, 2];
This game is built using:
Copyright © 2023 Karel Klima