Adding code for simulating a graph on the Brick