Exemplo n.º 1
0
 public void AddBoard(Player player)
 {
     if (GameBoards.Count < maxPlayerCount)
     {
         GameBoards.Add(new GameBoard(player, BoardLength));
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// Default constructor
 /// </summary>
 public HomeController()
 {
     if (games == null)
     {
         games    = new GameBoards();
         messages = new Dictionary <string, List <string> >();
     }
 }
Exemplo n.º 3
0
        public Board ImportZZTBoard(ZReader.ZBoard board)
        {
            var newBoard = Board.ImportZZT(board);

            newBoard.IsVisible = false;
            newBoard.IsEnabled = false;
            Children.Add(newBoard);

            GameBoards.Add(newBoard.Name.ToLower().Trim(), newBoard);

            newBoard.UseMouse = false;
            newBoard.Surface.ConnectLines();
            newBoard.Surface.IsDirty = true;
            return(newBoard);
        }
 void StartPUState()
 {
     //初始化
     TeamOf.Clear();
     GameBoards.Clear();
     Teams.Clear();
     RemainUnits.Clear();
     TeamsOKToAttack.Clear();
     for (int i = 0; i < Info.TeamCount; i++)
     {
         Teams.Add(new List <string>());
         GameBoards.Add(Info.Mask.GetFullPlayerGameBoard());
         RemainUnits.Add(GetNewUnitCount());
     }
     foreach (string Name in OnlinePlayers)
     {
         GetTeam(Name);
     }
 }