public Colony(Color col, System.Windows.Point loc, IMotherNature world) { myWorld = world; // Anthill location = loc; hill = new List <System.Drawing.Point>(); hill.Add(new System.Drawing.Point { X = (int)location.X - 43, Y = (int)location.Y - 25 }); hill.Add(new System.Drawing.Point { X = (int)location.X, Y = (int)location.Y - 50 }); hill.Add(new System.Drawing.Point { X = (int)location.X + 43, Y = (int)location.Y - 25 }); hill.Add(new System.Drawing.Point { X = (int)location.X + 43, Y = (int)location.Y + 25 }); hill.Add(new System.Drawing.Point { X = (int)location.X, Y = (int)location.Y + 50 }); hill.Add(new System.Drawing.Point { X = (int)location.X - 43, Y = (int)location.Y + 25 }); eggs = new List <Egg>(); ants = new List <Ant>(); color = col; foodstore = MotherNature.INITIAL_FOOD_STORE; }
public World() { InitializeComponent(); myWorld = new MotherNature(pctWorld.ClientSize.Width, pctWorld.ClientSize.Height); RedColony rcolo = new RedColony(new System.Windows.Point(400, 200), myWorld); rcolo.Spawn(8); myWorld.AddColony(rcolo); GreenColony gcolo = new GreenColony(new System.Windows.Point(1400, 200), myWorld); gcolo.Spawn(8); myWorld.AddColony(gcolo); BlueColony bcolo = new BlueColony(new System.Windows.Point(900, 800), myWorld); bcolo.Spawn(8); myWorld.AddColony(bcolo); myWorld.Initialize(); score = new Score(this); score.Show(); }
public override void OnceLoad() { if (!this.AllObjReady) { this.width = 2400; this.height = 1800; myWorld = new MotherNature(this.width, this.height); RedColony rcolo = new RedColony(new System.Windows.Point(400, 200), myWorld); rcolo.Spawn(40); myWorld.AddColony(rcolo); GreenColony gcolo = new GreenColony(new System.Windows.Point(1200, 600), myWorld); gcolo.Spawn(40); myWorld.AddColony(gcolo); myWorld.Initialize(); colonies = new List <Colony>(); food = new List <FoodCluster>(); bricks = new List <BrickCluster>(); rocks = new List <Rock>(); pheromons = new List <Pheromon>(); alea = new Random(); this.AllObjReady = true; } }
public BlueColony(System.Windows.Point loc, IMotherNature world) : base(Color.Blue, loc, world) { queen = new BlueQueen(new System.Drawing.Point((int)loc.X, (int)loc.Y), new System.Drawing.Point(0, 0), this); }