Battleships

From richmondmakerlabs.uk
Jump to navigation Jump to search

Game Rules

Setting up

  • Each player has a grid of 10 × 10 units, with a Cartesian co-ordinate system x = 0 to 9 and y = 0 to 9
  • 5 ships distributed among the grid : carrier (5 units), battleship (4 units), cruiser (3 units), submarine (3 Units), destroyer (2 units)
  • These ships are distributed throughout the grid of each player and at the player's discretion according to the following rules
    • Ships are placed on the grid in a horizontal or vertical position, not diagonally
    • Ships are not allowed to overlap each other
    • The position of the ships cannot be changed once the game has begun

Competition

  • Player 1 and 2 are assigned to each of the players randomly, with player 1 going first in game 1 and alternating subsequently between the two players
  • A 1000 games are played each set and every contestant will play all the other contestants for every set, with a total of 10 sets per match.
  • The contestant with the most set wins in total is the winner.
  • In the case of a tie, players will battle for first and second place.

Game Play

  • Pick a target unit, for example (x = 0, y = 8)
  • If the target location is occupied by a ship then it is declared a Hit 'H' otherwise it is a Miss 'M'
  • When all a ship's units have been shot the ship's player declares the ship Sunk 'S'

Data output example

carrier [0,0,0,0,0][1,2,3,4,5] battleship [3,3,3,3][0,1,2,3] cruiser [7,8,9][4,4,4] submarine [8,8,8][3,4,5] destroyer [2,2][4,4]

1. B [2,5] 2. M [3,2] 3. M [6,4] 4. H [4,5] 5. M [6,3] 6. H [3,3] 7. M [6,2] 8. S [3,3]