Skip to content

nmarth2993/battleshipp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Battleshipp

This project was for the purpose of learning C++. You can find some notes about what I learned in learned.txt The program is capable of letting either a human or computer play against randomly placed ships.

The Strategy

The default computer player chooses a random square that has not yet been hit. There is another strategy included which, to my knowledge, is the best possible battleship strategy.

The strategy is an implementation of an amazing write-up done by DataGenetics

battleshipfast

Visual example of the strategy

Installation

To run this program yourself, simply download the project and run the included makefile.

Note that the default makefile produces an executable which runs the computer strategy for 100 games.

The program can be compiled and run using the command

make && make run

About

C++ battleship

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published