protected void InitialPassenger(int num)//初始化乘客 { Generator = new PassengerGenerator(); Generator.Generate(num); Passengers[0] = new Passenger(Generator.NextA(), false, 1); Passengers[1] = new Passenger(Generator.NextB(), false, 2); Passengers[2] = new Passenger(Generator.NextA(), false, 3); Passengers[3] = new Passenger(Generator.NextB(), false, 4); Passengers[4] = new Passenger(Generator.NextS(), true, 5); CheckPassengerNumber(); }
public Game() { CarA = new Car(Camp.CampA); CarB = new Car(Camp.CampB); Passengers = new Passenger[MaxPassenger]; Round = 0; state = GameState.Unstart; Generator = new PassengerGenerator(); Generator.Generate(500); Passengers[0] = new Passenger(Generator.NextA(), false, 1); Passengers[1] = new Passenger(Generator.NextB(), false, 2); Passengers[2] = new Passenger(Generator.NextA(), false, 3); Passengers[3] = new Passenger(Generator.NextB(), false, 4); Passengers[4] = new Passenger(Generator.NextS(), true, 5); CheckPassengerNumber(); }