Skip to content

Latest commit

 

History

History
50 lines (33 loc) · 1.18 KB

README.md

File metadata and controls

50 lines (33 loc) · 1.18 KB

Battleship

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.

Running the game locally

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.

Configuration options

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];

Technology

This game is built using:

License

MIT License

Copyright © 2023 Karel Klima