예제 #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;
 }
예제 #2
0
 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;
 }
예제 #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();
        }
예제 #4
0
 public OceanConsoleViwer(Ocean ocean)
 {
     _ocean = ocean;
 }
예제 #5
0
 public Obstacle(Ocean owner, Coordinate coordinate)
     : base(owner, coordinate)
 {
 }
예제 #6
0
 public int GetDeltaY(Ocean ocean, Cell someEntity)
 {
     return(ocean.NumCols - someEntity.Position.Y);
 }
예제 #7
0
 public int GetDeltaX(Ocean ocean, Cell someEntity)
 {
     return(ocean.NumRows - someEntity.Position.X);
 }
예제 #8
0
파일: Prey.cs 프로젝트: fllimon/OceanDemo
 public Prey(Ocean owner, Coordinate coordinate)
     : base(owner, coordinate)
 {
 }
예제 #9
0
파일: Cell.cs 프로젝트: fllimon/OceanDemo
 public Cell(Ocean owner, int x, int y)
     : this(owner, new Coordinate(x, y))
 {
 }
예제 #10
0
파일: Cell.cs 프로젝트: fllimon/OceanDemo
 public Cell(Ocean owner, Coordinate coordinate)
 {
     _coordinate = coordinate;
     _owner      = owner;
 }