Class Random

java.lang.Object
All Implemented Interfaces:
Player

public class Random
extends Computer
place its ship and choose moves randomly
  • Constructor Details

    • Random

      public Random()
  • Method Details

    • chooseMove

      public Pair<java.lang.Integer,​java.lang.Integer> chooseMove()
      Description copied from interface: Player
      Used by computer only
      Returns:
      coords in its opponent grid to play a move
      See Also:
      chooseMove()
    • placeShips

      public void placeShips()
      Description copied from interface: Player
      Used by Computer instances to place ships