public static Disaster Random() { Random random = new Random(); int nLifelines = random.Next(1, 10); Lifeline[] lifelines = new Lifeline[nLifelines]; for (int i = 0; i < nLifelines; i++) { Lifeline lifeline = Extensions.GetRandomLifeline(); lifelines[i] = lifeline; } Disaster disaster = new Disaster("Hurricane", lifelines); return(disaster); }
static Game NewGame() { Disaster disaster = Disaster.Random(); int handCount = 5; List <OpsCard> hand = new List <OpsCard>(); for (int i = 0; i < handCount; i++) { hand.Add(OpsCard.Random()); } Game game = new Game(disaster, hand); return(game); }
public Game(Disaster disaster, List <OpsCard> hand) { this.disaster = disaster; this.hand = hand; }