Example #1
0
        void ChangeUserTurn()
        {
            Current = Game.Players[Game.Turn] as CUser;
            Rival   = Game.GetRivalByPlayer(Current) as CUser;

            Current.Count.Text = "" + Current.Remainders;
            Rival.Count.Text   = "" + Rival.Remainders;
        }
Example #2
0
 public void ClearCheckedButtons(CUser user)
 {
     foreach (var b in user.Buttons)
     {
         if (b.Checked)
         {
             b.Checked = false;
         }
     }
 }
Example #3
0
        public CUser AddPlayer(string name, AICategory level, Color c, Panel panel, PictureBox picture, Label lcount)
        {
            try
            {
                if (Players.Count >= MAX_PLAYERS)
                {
                    return(null);
                }

                CUser u = new CUser(name, level, c, panel)
                {
                    Picture = picture,
                    Count   = lcount,
                };
                u.SetSecret(GetRandomSolution(u));
                u.Board.Logger = Logger;
                Players.Add(u);
                return(u);
            }
            catch (Exception)
            {
                return(null);
            }
        }