Added a test script, and some fixes to make the game work for tests