Oct-26-2018, 05:12 PM
(This post was last modified: Oct-26-2018, 05:20 PM by Ablazesphere.)
(Oct-26-2018, 04:47 PM)micseydel Wrote: I only vaguely looked at your other thread, so forgive me if this is "mean" instead of a "good comment" but: Line 6 evaluates to 'y', which is probably not what you intended. Line 12 behaves as it appears you intended, but not for the reasons it looks like. If you change 'y' to 'yes' and play with it you might see why. (Line 64 has the same problem.) On line 15 you can use random.choice() and skip using an index (I would consider that more elegant, since it skips the implementation detail of the index). Lines 21 and 22 can be omitted. The other +=0 lines later can be as well. Line 23 could be even more robust by usingplayer.lower() == "rock"
. Lines 25 and 30 can be consolidated into a single on between lines 23 and 24. Your loop on line 56 could/should just be an if, since youbreak
unconditionally within it. Same with the loop on line 64. You have logic that looks like the game will restart if a player chooses to do so, but it doesn't actually.
Wait. It should have restarted let me check bro.
(Oct-26-2018, 04:47 PM)micseydel Wrote: I only vaguely looked at your other thread, so forgive me if this is "mean" instead of a "good comment" but: Line 6 evaluates to 'y', which is probably not what you intended. Line 12 behaves as it appears you intended, but not for the reasons it looks like. If you change 'y' to 'yes' and play with it you might see why. (Line 64 has the same problem.) On line 15 you can use random.choice() and skip using an index (I would consider that more elegant, since it skips the implementation detail of the index). Lines 21 and 22 can be omitted. The other +=0 lines later can be as well. Line 23 could be even more robust by usingplayer.lower() == "rock"
. Lines 25 and 30 can be consolidated into a single on between lines 23 and 24. Your loop on line 56 could/should just be an if, since youbreak
unconditionally within it. Same with the loop on line 64. You have logic that looks like the game will restart if a player chooses to do so, but it doesn't actually.
Dude i checked and it restarts as it should have and yes you wont get it right if you input 'yes' instead of 'y' cause this isn't a perfectly built program. Thank You for letting me know the minor things which i could later on update it. This is the kind of comments which i expect the last one ended up saying "Do whatever you want" this pissed me off.
Anyway Thank You.