Added tests for Gamestate & fixed indexing errors

Indexing errors are annoying.