Battleship game. Iron Yard Homework Week 2
Switch branches/tags
Nothing to show
Clone or download
Pull request Compare This branch is 25 commits ahead, 3 commits behind tiyd-rails-2015-08:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
LICENSE
README.md
battleship.rb
battleship_test.rb
battleship_test2.rb
computer_player.rb
game.rb
grid.rb
human_player.rb
player.rb
position.rb
ship.rb

README.md

Battleship

Description

The classic game of Battleship! Written in pure ruby.

Usage

  • Clone this repository git clone https://github.com/dbernheisel/battleship.git
  • Change into the directory cd battleship
  • Run Battleship ruby battleship.rb
  • The game will start to prompt you.

If you want Normal mode's test to work, you will need to go back to a previous commit.

  • Clone the repository
  • go into the directory
  • run git checkout 84d85df
  • Now you can run ruby battleship_test.rb and you'll get a fabulous test.

Features

  • Salvo Mode!
  • Wicked ASCII art.
  • Dumb AI so you can win easily.
  • Setup a board with any grid size (up to 702, but really?).
  • Have any number of ships of any length.
  • Includes tests that don't work anymore! If you want the tests to work, then clone the repository on an older commit without some of the features above.

TODO

  • Add salvo mode
  • Pass all the tests
  • Re-write tests to anticipate new "onboarding" user flow.
  • Write 10 more tests