When starting a game with only a keyboard connected (no joystick)
This error is thrown:
Identified the issue is caused because pygame.joystick.get_count() [in gameloop(striker_color)] returns zero and hence no joystick object is created. Hence the UnboundedLocalVariable Error.
Solution:
joystick=None (in gameloop(striker_color)
and the following highlighted changes in event(joystick):
Submitting a pull request with the suggested solution
When starting a game with only a keyboard connected (no joystick)
This error is thrown:![screenshot from 2018-12-16 19-13-58](https://user-images.githubusercontent.com/44719317/50130571-3cd51380-02a4-11e9-9b77-7f0af99c960a.png)
Identified the issue is caused because pygame.joystick.get_count() [in gameloop(striker_color)] returns zero and hence no joystick object is created. Hence the UnboundedLocalVariable Error.
Solution: joystick=None (in gameloop(striker_color)
and the following highlighted changes in event(joystick):
Submitting a pull request with the suggested solution