added rest of game logic. need to convert to get variables from server