public UltimateTicTacToe(MainUI MUI, CommunicationCenter CC, int PlayerMode) { InitializeComponent(); this.MUI = MUI; this.CC = CC; this.PlayerMode = PlayerMode; // Board Setup BackgroundBrush = new SolidBrush(Color.FromArgb(40, 40, 40)); SubButton = new SolidBrush(Color.FromArgb(100, 100, 100)); SelectedSubButton = new SolidBrush(Color.FromArgb(255, 204, 0)); SubTiles = new Rectangle[81]; int yPointer = buttonPadding; for (int i = 0; i < 9; i++) { int xPointer = buttonPadding; for (int k = 0; k < 9; k++) { SubTiles[(i * 9) + k] = new Rectangle(yPointer, xPointer, buttonSize, buttonSize); xPointer += buttonSize; if (k == 2 || k == 5) { xPointer += boardPadding; } else { xPointer += buttonPadding; } } yPointer += buttonSize; if (i == 2 || i == 5) { yPointer += boardPadding; } else { yPointer += buttonPadding; } } // End setup }
public void SetUI(MainUI MUI) { this.MUI = MUI; }
public GameManager(bool InternalSimulator, TicTacToe Sim, CommunicationCenter CC, CommandCenter[] AIs, MainUI MUI) { this.InternalSimulator = InternalSimulator; this.Sim = Sim ?? throw new ArgumentNullException("The internal simulator cannot be null"); this.CC = CC; this.AIs = AIs; this.MUI = MUI; }
public CommunicationCenter(InternalDataTransfer IDT, InternalSimulator testSim, MainUI M) { this.IDT = IDT; TestSimulator = testSim; Rnd = new Random(); M.LogHumanMove += new MainUI.PingCC(LogHumanMove); }
public CommunicationCenter(InternalDataTransfer IDT, MainUI M) { this.IDT = IDT; Rnd = new Random(); M.LogHumanMove += new MainUI.PingCC(LogHumanMove); }
public CommunicationCenter(MainUI M) { IDT = new InternalDataTransfer(); Rnd = new Random(); M.LogHumanMove += new MainUI.PingCC(LogHumanMove); }