Refactor Game class to not use so many static functions and global variables.