Skip to content

abdullah599/BattleShip

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BATTLESHIP
Battleship is a strategy-type guessing game for two players.
It is played on ruled grids on which each player's fleet of ships (including battleships) is marked.
The locations of the boats are concealed from the other players.
Players alternate turns calling "shots" at the other player's ships, and the objective of the game is to destroy the opposing player's boats.

Each ship must be placed horizontally or vertically across grid spaces (not diagonally) and the ships can't hang off the grid.
Ships can touch each other, but they can't occupy the same grid space.
You cannot change the position of the ships after the game begins.

How to play:
1)Click on play to start the game.
2)Press ENTER to start the game.
3)Place ships by arrow keys (you can also rotate them by pressing "R").
4)After setting up your ships, the computer will set up its ships.
5)Then you will guess where the computer has placed its ship. 

To edit code:
To run code you need to install SFML library and you are good to go

About

Developed a 2D grid-based game called Battleship using C++. Implemented Ship placement, player input validation, and much more. Using SFML, generated a visually appealing GUI, which improved user experience.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages