Пример #1
0
 /// <summary>
 /// The main entry point for the application.
 /// </summary>
 static void Main(string[] args)
 {
     using (Logic game = new Logic())
     {
         game.Run();
     }
 }
Пример #2
0
 public AntBrain(String FilePath, Ant[] Ants, Logic MyLogic)
 {
     BC = new BrainChecker(FilePath);
     BC.runCheck();
     commands = BC.getCommands();
     ants = Ants;
     myLogic = MyLogic;
     for (int i = 0; i < 10000; i++)
     {
         if (commands[i] == null)
         {
             commands[i] = new AntCommand("flip", "1", "0", "0", null, null);
         }
     }
 }
Пример #3
0
 public Ant(Game game, Logic MyLogic, String Colour, int X, int Y, int Dir, int id)
     : base(game)
 {
     state = 0;
     restingNum = 0;
     carryingFood = false;
     isAlive = true;
     resting = false;
     colour = Colour;
     x = X;
     y = Y;
     dir = Dir;
     ID = id;
     myLogic = MyLogic;
     myTile = myLogic.getTile(x, y);
     if(colour.Equals("red"))
     {
         myLogic.loadTile(x, y, myLogic.texAntsOnHillRed[0], myLogic.spriteBatch, false, true, false, 0, true, "red");
     }
     else if (colour.Equals("black"))
     {
         myLogic.loadTile(x, y, myLogic.texAntsOnHillBlack[0], myLogic.spriteBatch, false, true, false, 0, true, "black");
     }
 }
Пример #4
0
 public WorldGeneration(Game game, Logic logic)
     : base(game)
 {
     myLogic = logic; //this is important, from the Logic class, we need the method LoadTile(whatevers in here),
     // but this class will be inside that one so this is how we get at that method
 }