public DecisionForm(Player aPlayer, GameMaster aMaster, MasterForm _MasterForm) { InitializeComponent(); theMaster = aMaster; thePlayer = aPlayer; theMasterForm = _MasterForm; np = theMaster.nPlayers; spyCounter = 0; pl = (thePlayer.position + 1) % np; //Left Player pr = (thePlayer.position + np - 1) % np; //Right Player this.Text = thePlayer.wonder + "'s Decision"; if (thePlayer.decisions[0] > 0) { mode = "Olympus"; } else if (thePlayer.decisions[1] > 0) { mode = "Spy Card"; } else if (thePlayer.decisions[2] > 0) { mode = "Courtesan"; } else if (thePlayer.decisions[3] > 0) { mode = "Science Symbol"; } else if (thePlayer.decisions[4] > 0) { mode = "Halikarnassos"; } else if (thePlayer.rome) { mode = "Rome"; } spaces = new Label[48]; spaces[0] = label1; spaces[1] = label2; spaces[2] = label3; spaces[3] = label4; spaces[4] = label5; spaces[5] = label6; spaces[6] = label7; spaces[7] = label8; spaces[8] = label9; spaces[9] = label10; spaces[10] = label11; spaces[11] = label12; spaces[12] = label13; spaces[13] = label14; spaces[14] = label15; spaces[15] = label16; spaces[16] = label17; spaces[17] = label18; spaces[18] = label19; spaces[19] = label20; spaces[20] = label21; spaces[21] = label22; spaces[22] = label23; spaces[23] = label24; spaces[24] = label25; spaces[25] = label26; spaces[26] = label27; spaces[27] = label28; spaces[28] = label29; spaces[29] = label30; spaces[30] = label31; spaces[31] = label32; spaces[32] = label33; spaces[33] = label34; spaces[34] = label35; spaces[35] = label36; spaces[36] = label37; spaces[37] = label38; spaces[38] = label39; spaces[39] = label40; spaces[40] = label41; spaces[41] = label42; spaces[42] = label43; spaces[43] = label44; spaces[44] = label45; spaces[45] = label46; spaces[46] = label47; spaces[47] = label48; button1.Visible = false; switch (mode) { case "Olympus": ShowNeighbours("Purple"); break; case "Spy Card": ShowNeighbours("Green"); break; case "Courtesan": ShowNeighbours("White"); break; case "Science Symbol": for (int i = 0; i < 48; i++) { spaces[i].Text = ""; } spaces[0].Text = "Compass (" + thePlayer.sciences[0].ToString() + ")"; spaces[16].Text = "Gear (" + thePlayer.sciences[1].ToString() + ")"; spaces[32].Text = "Tablet (" + thePlayer.sciences[2].ToString() + ")"; break; case "Halikarnassos": ShowDiscards(0); break; case "Rome": for (int i = 0; i < 48; i++) { spaces[i].Text = ""; } int filled = thePlayer.leaderHand.Length; for (int i = 0; i < filled; i++) { spaces[i + 16].Text = thePlayer.leaderHand[i].name; spaces[i + 16].BackColor = Color.White; } label33.Text = "Coins: " + thePlayer.resources[0].ToString(); break; } _CardForm = new CardForm(); _CardForm.Hide(); }
private void Constructor() { InitializeComponent(); phase = 0; spaces = new Label[84]; spaces[0] = label1; spaces[1] = label2; spaces[2] = label3; spaces[3] = label4; spaces[4] = label5; spaces[5] = label6; spaces[6] = label7; spaces[7] = label8; spaces[8] = label9; spaces[9] = label10; spaces[10] = label11; spaces[11] = label12; spaces[12] = label13; spaces[13] = label14; spaces[14] = label15; spaces[15] = label16; spaces[16] = label17; spaces[17] = label18; spaces[18] = label19; spaces[19] = label20; spaces[20] = label21; spaces[21] = label22; spaces[22] = label23; spaces[23] = label24; spaces[24] = label25; spaces[25] = label26; spaces[26] = label27; spaces[27] = label28; spaces[28] = label29; spaces[29] = label30; spaces[30] = label31; spaces[31] = label32; spaces[32] = label33; spaces[33] = label34; spaces[34] = label35; spaces[35] = label36; spaces[36] = label37; spaces[37] = label38; spaces[38] = label39; spaces[39] = label40; spaces[40] = label41; spaces[41] = label42; spaces[42] = label43; spaces[43] = label44; spaces[44] = label45; spaces[45] = label46; spaces[46] = label47; spaces[47] = label48; spaces[48] = label49; spaces[49] = label50; spaces[50] = label51; spaces[51] = label52; spaces[52] = label53; spaces[53] = label54; spaces[54] = label55; spaces[55] = label56; spaces[56] = label57; spaces[57] = label58; spaces[58] = label59; spaces[59] = label60; spaces[60] = label61; spaces[61] = label62; spaces[62] = label63; spaces[63] = label64; spaces[64] = label65; spaces[65] = label66; spaces[66] = label67; spaces[67] = label68; spaces[68] = label69; spaces[69] = label70; spaces[70] = label71; spaces[71] = label72; spaces[72] = label73; spaces[73] = label74; spaces[74] = label75; spaces[75] = label76; spaces[76] = label77; spaces[77] = label78; spaces[78] = label79; spaces[79] = label80; spaces[80] = label81; spaces[81] = label82; spaces[82] = label83; spaces[83] = label84; handSpaces = new Label[8]; handSpaces[0] = label85; handSpaces[1] = label86; handSpaces[2] = label87; handSpaces[3] = label88; handSpaces[4] = label89; handSpaces[5] = label90; handSpaces[6] = label91; handSpaces[7] = label92; for (int i = 0; i < 8; i++) { handSpaces[i].Text = ""; } for (int i = 0; i < 80; i++) { spaces[i].Text = ""; } int size = thisPlayer.wonderStages.Length; for (int i = 0; i < 4; i++) { if (i < size) { spaces[i + 80].Text = thisPlayer.wonderStages[i].name; } else { spaces[i + 80].Text = ""; } } pictureBox1.SizeMode = PictureBoxSizeMode.Zoom; pictureBox1.Image = Image.FromFile(thisPlayer.wonder + ".jpg"); this.Text = thisPlayer.wonder; InitalResource(); UpdateGold(); _CardForm = new CardForm(); _CardForm.Hide(); _LeaderHandForm = new LeaderHandForm(thisPlayer.leaderHand); _LeaderHandForm.Hide(); int filled = thisPlayer.builtCards.Count(x => x != null); for (int i = 0; i < filled; i++) { ShowBuiltCard(thisPlayer.builtCards[i]); } }