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; }
public void ClearCheckedButtons(CUser user) { foreach (var b in user.Buttons) { if (b.Checked) { b.Checked = false; } } }
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); } }