Moved data-structure functions to be methods on GameState, so future performance work is encapsulated