Exemplo n.º 1
0
        public void GenerateSingleSide()
        {
            switch (NextToGenerate)
            {
            case 1:
                Behave.Generate(PositiveGenrate, PositiveArea);
                break;

            case -1:
                Behave.Generate(NegativeGenrate, NegativeArea);
                break;
            }
            NextToGenerate *= -1;
        }
Exemplo n.º 2
0
 protected Game()
 {
     Core         = new Core(Properties.Settings.Default.GameSize);
     Move         = new Movement();
     Behave       = new Behave(Move, Core);
     PositiveArea = new Rectangle(0, 0, Core.GameSize - 1, Core.GameSize - 1);
     NegativeArea = new Rectangle(Core.GameSize + 1, 0, Core.GameSize - 1, Core.GameSize - 1);
     DoorArea     = new Rectangle(Core.GameSize, 0, 1, Core.GameSize);
     Door         = new Door(Core, DoorArea, Move);
     // Door.SetValue(Properties.Settings.Default.DoorStatus);
     Door.Post();
     InitialParametrs = new Dictionary <List <long>, Rectangle>
     {
         { PositiveGenrate, PositiveArea },
         { NegativeGenrate, NegativeArea }
     };
 }
Exemplo n.º 3
0
 public void NewGame()
 {
     Behave.Clear(0);
     Behave.NewGame(InitialParametrs, 1);
 }
Exemplo n.º 4
0
 public void GenerateBothSide()
 {
     Behave.Generate(PositiveGenrate, PositiveArea);
     Behave.Generate(NegativeGenrate, NegativeArea);
 }