Actually, I found a mention of something in the source i'm not quite sure of (not a master of c#)
Creates an instance called neighbors which can hold a max of 5 entries.. I'll bump it up and see what happens.Code:else if (newCurrent == CurrentType.OFF) { WireTransfer[] neighbours = new WireTransfer[4]; storeNeighbours(updatedWire, neighbours, true); updatedWire.setCurrent(CurrentType.OFF); updatedWire.setCurrentTransfer(currentTransfer); updatePowerGrid(updatedWire, ref result); for (int i = 0; i < 4; i++) { if (neighbours[i] == null) continue; updatePowerGrid(neighbours[i], ref result); } }


Reply With Quote
Bookmarks