I am writing unit test cases for a game I am working on. When the game starts, the player is positioned randomly, and I have two problems with that:
One approach you can take is to split out the random-position generation into a separate class/interface, so that you can override it in your test, and therefore control it.