Skip to content

naomiyocum/battleship

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

65 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Battleship 🚢

GitHub Contributors GitHub language count GitHub top language

drawing

Table of contents

General Info

Battleship was a paired project assigned to us during week 2 of Mod 1 of 4 in Turing's School of Software & Design. Our challenge was to use Ruby to build a command line implementation of the classic game Battleship.

Battleship is a classic board game where players place one or more ships on a grid board, and then take turns trying to “sink” the other player’s ships by guessing their coordinates. The game ends when one player’s ships are all hit and “sunk”.

Learning Goals

  • Utilize Test-Driven Development (TDD)
  • Practice algorithmic thinking
  • Create an Object-Oriented solution to a problem without being given full specifications
  • Work in a pair, using Pull Requests to collaborate

Technologies

  • Ruby 2.7
  • RSpec
  • Pry
  • SimpleCov
  • Git
  • Atom

Usage 🚢

You need to clone the project onto your local machine and run the file.

git clone [email protected]:naomiyocum/battleship.git
cd battleship
ruby battleship_runner.rb

After running these commands, you should see a prompt welcoming you to the game!

After entering p, you will be prompted to place your ships, similar to the image below.

Screen Shot 2022-11-16 at 12 11 44 PM

After ship placement, you and the computer will take turns attempting to hit each other's battleships. May the odds be in your favor.

About

A CLI Battleship game - you vs the computer.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages