CAGenerationSystem extends BaseEntitySystem { public void _generate(EventManager eMan, CAGridComponents gridComps, final int entId) { gridComps.generation += 1; CAs.get(gridComps.ca).generate(gridComps); logger.trace("liveCells: " + gridComps.cellCount); int deltaIntensity = gridComps.cellCount * gridComps.intensityPerCell; logger.trace("cells increase intensity by " + deltaIntensity); if (moodSystem != null) moodSystem.intensity += deltaIntensity; eMan.pushEvent(new EntityEvent(entId, GameEvent.CA_GENERATION)); } CAGenerationSystem(); void _inserted(CAGridComponents layerStuff, Boolean autoGenerate, final int entId); void _generate(EventManager eMan, CAGridComponents gridComps, final int entId);  }
@Test public void testGenerateOnBlinker() { CAGenerationSystem testSystem = new CAGenerationSystem(); CAGridComponents testComps = new CAGridComponents(); setupTest(testSystem, testComps, CGoLShapeConsts.BLINKER_H); EventManager eventManager = new EventManager(); testSystem._generate(eventManager, testComps, 0); assert testUtils.ifStatesMatchAt(testComps, CGoLShapeConsts.BLINKER_V, INP, INP); }