private int simulateShots(MalfunctionsProcessor malfunctionsProcessor) { // Simulate shooting many times int malfunctionCount = 0; for (int i = 0; i < 100; i++) { if (!malfunctionsProcessor.processShot(shot)) malfunctionCount++; } return malfunctionCount; }
@Before public void setUp() throws ConfigurationException { config = new Configuration(new String[0]); config.setMalfunctions(true); shot = new Shot(Color.GREEN, 0, 0, 0, 0); MalfunctionsProcessor.setUseTTS(false); }