From 03be93b7e19a2ae1ad9107891e5141a9879d7ada Mon Sep 17 00:00:00 2001 From: quamrana Date: Sun, 28 Feb 2021 16:29:29 +0000 Subject: [PATCH] Update bowling.py Added comments about the conversion. In particular noting the original had problems keeping score and never calculated the final score. --- 14 Bowling/python/bowling.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/14 Bowling/python/bowling.py b/14 Bowling/python/bowling.py index 92a16440..42eaeddb 100644 --- a/14 Bowling/python/bowling.py +++ b/14 Bowling/python/bowling.py @@ -130,3 +130,19 @@ def main(): if __name__ == '__main__': main() + + +############################################################################################ +# +# This is a fairly straight conversion to python with some exceptions. +# I have kept most of the upper case text that the program prints. +# I have added the feature of giving names to players. +# I have added a Player class to store player data in. +# This last change works around the problems in the original storing data in a matrix. +# The original had bugs in calculating indexes which meant that the program +# would overwrite data in the matrix, so the results printed out contained errors. +# The last change is to do with the strict rules which allow extra rolls if the player +# scores a spare or strike in the last frame. +# This program allows these extra rolls and also calculates the proper score. +# +############################################################################################