refactoring betting in game