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; }
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(); }
public OceanConsoleViwer(Ocean ocean) { _ocean = ocean; }
public Obstacle(Ocean owner, Coordinate coordinate) : base(owner, coordinate) { }
public int GetDeltaY(Ocean ocean, Cell someEntity) { return(ocean.NumCols - someEntity.Position.Y); }
public int GetDeltaX(Ocean ocean, Cell someEntity) { return(ocean.NumRows - someEntity.Position.X); }
public Prey(Ocean owner, Coordinate coordinate) : base(owner, coordinate) { }
public Cell(Ocean owner, int x, int y) : this(owner, new Coordinate(x, y)) { }
public Cell(Ocean owner, Coordinate coordinate) { _coordinate = coordinate; _owner = owner; }