Skip to content

Battleships game made for the Final Project for Algorithms and Data Structures

Notifications You must be signed in to change notification settings

frieZZerr/BattleShips_Final_Project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

battleships

Rules

Basics

  1. 2-player strategy turn type game based on guessing opponent ships' positions.
  2. There are 2 boards with size = 10x10: one with player's ships and other with player's guessed positions.
  3. Players guess the coordinates of opponent's ships.
  4. Player who manages to destroy all opponent's ships wins.

Board

Each board is 2D and has letters A-J on the X-axis and numbers 1-10 on Y-axis:

boards

First one displays player's ships and seamine and the other guessed coordinates.

Ships

There are 4 types of battleships:

  • Destroyer --> size=1, amount=4
  • Cruiser --> size=2, amount=3
  • Battleship --> size=3, amount=2
  • Carrier --> size=4, amount=1

Coordinates input

  • ✔️ C6
  • ✔️ g3
  • K15

Seamine

Every player has a seamine. It's an object that generates only in the specified area:

seamine

If the current player shoots at the enemy's seamine coordinates it explodes, destroying everything in it's explosion radius that is 3x3. If the seamine is really close to a ship and the ship gets destroyed, it also triggers the explosion of this seamine.

Victory condition

The game ends if one of the players manages to destroy all of the enemy's ships.

Makefile

To run the game, write in console:

  • make
  • make game

You can clean up some files by typing make clean

About

Battleships game made for the Final Project for Algorithms and Data Structures

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published