made battle and game loop