public void newgame() { //if(showDiaglogNewGame()) gamecontrol.newGame(); Forms.frmNewGame frmN = new Forms.frmNewGame(); GameControl.locked = true; while (true) { frmN.ShowDialog(); if (frmN.DialogResult == System.Windows.Forms.DialogResult.OK) { if (frmN.rb_White.Checked) GameControl.humanColor = 1; else GameControl.humanColor = 2; if (frmN.rb_machine.Checked) { if (GameControl.humanColor == 1) { GameControl.p1 = Player.Type.Human; GameControl.p2 = Player.Type.Computer; } else { GameControl.p1 = Player.Type.Computer; GameControl.p2 = Player.Type.Human; } } else { GameControl.p1 = Player.Type.Human; GameControl.p2 = Player.Type.Human; } gamecontrol.newGame(); GameControl.locked = false; return; } else { GameControl.locked = false; return; } } }
public void ShowSetting() { Forms.frmNewGame frmN = new Forms.frmNewGame(); GameControl.locked = true; frmN.ShowDialog(); if (frmN.DialogResult == System.Windows.Forms.DialogResult.OK) { } GameControl.locked = false; }