Does the erroneous line in your World.step() method have square brackets in it anywhere? Or a get() method of some sort with an index in it. This error suggests that you're asking for an object in an array or list by providing an index outside of the array bounds. Array bounds start at 0, and end at array.Length - 1. So a lot of the time this error is caused by looping through objects in an array up to and including array.Length or list.Count If you can post your World.step() method, I can probably narrow it down a bit more for you.