示例#1
0
        public void ControllerStart(ISettnigs conf)
        {
            ControledElements = new List <AbstractPlayer>();
            for (int player = 0; player < conf.HumanPlayers; player++)
            {
                ControledElements.Add(new Person(conf.PlayersControlKeys[player], conf.Lives));
            }

            for (int player = 0; player < conf.ComputerPlayers; player++)
            {
                ControledElements.Add(new Bot());
            }
        }
示例#2
0
文件: Walls.cs 项目: kosski/QAgora
        public Walls(ISettnigs conf)
        {
            ControledElements = new List <Brick>();
            ControllerStart(conf);
            int wallsInWidth  = (int)(arenaWidth / (Game.SingleplayerEngine.Size)) - 2;
            int wallsInHeight = (int)(arenaHeight / (Game.SingleplayerEngine.Size)) - 2;

            NewWall(0, (int)arenaHeight / (Game.SingleplayerEngine.Size) - 2, 1, wallsInHeight);
            NewWall(0, 0, 2, wallsInWidth);
            NewWall((int)arenaWidth / (Game.SingleplayerEngine.Size) - 2, 0, 3, wallsInHeight);
            NewWall((int)arenaWidth / (Game.SingleplayerEngine.Size) - 2, (int)(arenaHeight / (Game.SingleplayerEngine.Size)) - 2, 4, wallsInWidth);

            //this.ControledElements = new List<Brick>();
            //foreach (var wall in conf.WallsMap)
            //{
            //    this.NewWall(wall[0], wall[1], wall[2], wall[3]);
            //}
        }
示例#3
0
文件: Walls.cs 项目: kosski/QAgora
 public Walls(List <Brick> controledElements, ISettnigs conf)
 {
     this.ControledElements = new List <Brick>(controledElements);
 }
示例#4
0
文件: Walls.cs 项目: kosski/QAgora
 public void ControllerStart(ISettnigs conf)
 {
     arenaHeight = conf.ArenaHeight;
     arenaWidth  = conf.ArenaWidth;
 }
示例#5
0
 public void ControllerStart(ISettnigs conf)
 {
     ControledElements = new List <Apple>();
     NewPoints();
     //TODO
 }
示例#6
0
 public void UpdatePoints(List <Apple> points, ISettnigs conf)
 {
     ReadPointConf();
     this.ControledElements = points;
     ControllerStart(conf);
 }
示例#7
0
 public PointControler(ISettnigs conf)
 {
     ReadPointConf();
     ControllerStart(conf);
 }
示例#8
0
 public void ControllerStart(ISettnigs conf)
 {
     throw new NotImplementedException();
 }
示例#9
0
 public PlayerController(ISettnigs conf)
 {
     _singleplayerEngine = SingleplayerEngine.Instance;
     ControllerStart(conf);
 }