This ought to do it for the simulation, more explanation when it's not late
Merge https://github.com/danielgordon/spaceprisoners