private void button1_Click(object sender, EventArgs e) { if (players == 1) { Global.numPlayers = players; Global.p1 = new Player(Global.demoPos); } else if (players == 2) { Global.numPlayers = players; Global.p1 = new Player(Global.demoPos); Global.p2 = new Player(Global.demoPos); } else if (players == 3) { Global.numPlayers = players; Global.p1 = new Player(Global.demoPos); Global.p2 = new Player(Global.demoPos); Global.p3 = new Player(Global.demoPos); } else if (players == 4) { Global.numPlayers = players; Global.p1 = new Player(Global.demoPos); Global.p2 = new Player(Global.demoPos); Global.p3 = new Player(Global.demoPos); Global.p4 = new Player(Global.demoPos); } else if (players == 5) { Global.numPlayers = players; Global.p1 = new Player(Global.demoPos); Global.p2 = new Player(Global.demoPos); Global.p3 = new Player(Global.demoPos); Global.p4 = new Player(Global.demoPos); Global.p5 = new Player(Global.demoPos); } else { throw new ArgumentOutOfRangeException(); } Global.populateCardDatabase(); //Should be in the main form but here for now MessageBox.Show("For demo purposes, you will start at tile 6 and play until tile 26 (age 16-55).", "Demo Version", MessageBoxButtons.OK, MessageBoxIcon.Warning); Form newGame = new TurnScreen(); newGame.Show(); newGame.Location = this.Location; this.Hide(); }
private void choice1_Click(object sender, EventArgs e) { if (Global.playerTurn < Global.numPlayers) { advancePosition(); Global.playerTurn++; } else { advancePosition(); Global.playerTurn = 1; } Form newGame = new TurnScreen(); newGame.Show(); newGame.Location = this.Location; this.Hide(); }