public static IBlock NewBlock(BlockType blockType, int x, int y) { IBlock block; switch (blockType) { case BlockType.Controller: block = new SegmentControllerBlock(); break; case BlockType.Energy: block = new BasicEnergyBlock(); break; case BlockType.Wall: block = new BasicWall(); break; case BlockType.Beamer: block = new BasicBeamer(x, y); break; default: throw new ArgumentOutOfRangeException(nameof(blockType), blockType, null); } return(block); }
public void ResourceFormulae() { var block = new BasicEnergyBlock(); block.UpdateOutput(4738910, 0).Should().Be(4738910); }
public void ResourceFormulaeSingleNeighbour() { var block = new BasicEnergyBlock(); block.UpdateOutput(4738910, 1).Should().Be(2369455); }