Skip to content

charlie-galb/Battleships

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

83 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Battleships

This is a two-player game that runs in the command line, designed according to the user stories below. Its purpose, for me, was to practise TDD and OOP principles during the holiday period.

How to play

Simply run ruby lib/run_game.rb and follow the instructions.

User Stories

As a player  
So that I can prepare for the game  
I would like to place a ship in a board location  

As a player  
So that I can play a more interesting game  
I would like to have a range of ship sizes to choose from  

As a player  
So the game is more fun to play  
I would like a nice command line interface that lets me enter ship positions and shots using commands (rather than using IRB to interact with objects)  

As a player  
So that I can create a layout of ships to outwit my opponent  
I would like to be able to choose the directions my ships face in  

As a player  
So that I can have a coherent game  
I would like ships to be constrained to be on the board  

As a player  
So that I can have a coherent game  
I would like ships to be constrained not to overlap  

As a player  
So that I can win the game  
I would like to be able to fire at my opponent's board  

As a player  
So that I can refine my strategy  
I would like to know when I have sunk an opponent's ship  

As a player  
So that I know when to finish playing  
I would like to know when I have won or lost  

As a player  
So that I can consider my next shot  
I would like to be able to see my hits and misses so far  

As a player  
So that I can play against a human opponent  
I would like to play a two-player game  

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages