A turn-based platformer sounded really easy at first. Turns out that with some of the movements and restrictions on movements that we wanted to support, writing an algorithm proves to be very hard.
You see, in our game you're dealing with a bunch of sheep that you control - and as sheep can't occupy the same space (they stack and collide), coming up with rock-solid code for movement becomes a hard problem. Ideally, you want to move all the sheep in lock-step, however in code you can't do this, you have to move each sheep one by one.
One of the problems we encountered early on was this: if a sheep tries to move, and detects a collision with another sheep, it's not just a simple case of stopping there. The sheep it collided with, mightn't have moved yet, so might not be there anymore when it does move.
There are a whole bunch of problems to do with jumping and multiple sheep collisions as well.
We're up to 60 unit tests, and they're all just for the movement code. Only 2 failures at the moment, and we're trying to decide whether they represent features or actual bugs. Also, we currently have 1581 lines of Python code (not including blank lines), though most of that is the tests.