Example #1
0
        static void Main()
        {
            int rows      = UI.GetValue("Enter the number of rows: ", Ocean.DEFAULT_ROWS);
            int columns   = UI.GetValue("Enter the number of columns: ", Ocean.DEFAULT_COLUMNS);
            int prey      = UI.GetValue("Enter the number of prey: ", Ocean.DEFAULT_PREY);
            int predator  = UI.GetValue("Enter the number of predators: ", Ocean.DEFAULT_PREDATORS);
            int obstacles = UI.GetValue("Enter the number of obstacles: ", Ocean.DEFAULT_OBSTACLES);

            Ocean ocean1 = new Ocean(rows, columns, prey, predator, obstacles);

            ocean1.FillInOcean();
        }
Example #2
0
 public Obstacle(int x, int y, Ocean source)
     : base(x, y)
 {
     _game = source;
 }
Example #3
0
 public Prey(int x, int y, Ocean source)
 {
     _coord = new Coordinate(x, y);
     _game  = source;
 }
Example #4
0
 public Predator(int x, int y, Ocean source)
     : base(x, y, source)
 {
 }