Update game logic to communicate over JSON