Esempio n. 1
0
 public Seaweed(Ocean owner, Coordinate coordinate)
 //: base(owner, coordinate)
 {
     _numSeaweed       = DefaultSettings.DEFAULT_NUM_SEAWEED;
     _growthSpeed      = DefaultSettings.DEFAULT_GROWTH_SPEED;
     _countOnOceanArea = _numSeaweed;
     _seaweedCount     = _numSeaweed;
 }
 public OceanRandomInitializer(Ocean ocean, int numPrey = DefaultSettings.DEFAULT_NUM_PREY,
                               int numPredator          = DefaultSettings.DEFAULT_NUM_PREDATORS,
                               int numObstacle          = DefaultSettings.DEFAULT_NUM_OBSTACLE)
 {
     _ocean       = ocean;
     _numPrey     = numPrey;
     _numPredator = numPredator;
     _numObstacle = numObstacle;
 }
Esempio n. 3
0
        static void Main(string[] args)
        {
            Coordinate             coordinate             = new Coordinate(0, 0);
            Ocean                  oceanFirst             = new Ocean();
            OceanRandomInitializer oceanRandomInitializer = new OceanRandomInitializer(oceanFirst);
            OceanConsoleViwer      viewEntity             = new OceanConsoleViwer(oceanFirst);
            Predator               predator = new Predator(oceanFirst, coordinate);
            Obstacle               obstacle = new Obstacle(oceanFirst, coordinate);
            Prey prey = new Prey(oceanFirst, coordinate);

            oceanRandomInitializer.Run();
            viewEntity.Show();

            Console.ReadKey();
        }
Esempio n. 4
0
 public OceanConsoleViwer(Ocean ocean)
 {
     _ocean = ocean;
 }
Esempio n. 5
0
 public Obstacle(Ocean owner, Coordinate coordinate)
     : base(owner, coordinate)
 {
 }
Esempio n. 6
0
 public int GetDeltaY(Ocean ocean, Cell someEntity)
 {
     return(ocean.NumCols - someEntity.Position.Y);
 }
Esempio n. 7
0
 public int GetDeltaX(Ocean ocean, Cell someEntity)
 {
     return(ocean.NumRows - someEntity.Position.X);
 }
Esempio n. 8
0
 public Prey(Ocean owner, Coordinate coordinate)
     : base(owner, coordinate)
 {
 }
Esempio n. 9
0
 public Cell(Ocean owner, int x, int y)
     : this(owner, new Coordinate(x, y))
 {
 }
Esempio n. 10
0
 public Cell(Ocean owner, Coordinate coordinate)
 {
     _coordinate = coordinate;
     _owner      = owner;
 }