LinearSim.c works with Prof Staley's Cell. Passes the three given test cases plus some edge cases, three cells, two cells, and one cell.