public CrashMove RandomCrashMove() { var random = RandomNumber(); var crashmove = new CrashMove[] { new Truck(), new Car(), new Motorcycle() }; return(crashmove[random]); }
public int Victory(CrashMove crashMove) { if (crashMove is Car) { return(Victory(crashMove as Car)); } else if (crashMove is Motorcycle) { return(Victory(crashMove as Motorcycle)); } else if (crashMove is Truck) { return(Victory(crashMove as Truck)); } return(-2); }