private void button2_Click(object sender, EventArgs e) { Random s = new Random(); int sum; sum = s.Next(1, 9) + info.Adaptibility; if (sum >= 7) { MessageBox.Show("Success"); SupplyCloset n = new SupplyCloset(info); n.Show(); this.Hide(); } else { info.Energy = info.Energy - 4; if (info.Energy <= 0) { LoseScreen x = new LoseScreen(); x.Show(); this.Hide(); } else { MessageBox.Show("You have spilled coffee on yourself.\n\nTrying not to draw attention to yourself, you stifle your screams of pain and escape to the safety of the supply closet."); SupplyCloset n = new SupplyCloset(info); n.Show(); this.Hide(); } } //what happens when button 2 is clicked }
private void button1_Click(object sender, EventArgs e) { MessageBox.Show("Success!"); SupplyCloset n = new SupplyCloset(info); n.Show(); this.Hide(); //what happens when button 1 is clicked }