added logic and functions to support updating the game state vector