Python Forum
Thread Rating:
  • 1 Vote(s) - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
My version GhostGame
#5
My thoughts: There are too many single letter variable names, try to be more descriptive. I don't like the _ after key words so they can be variable names. I would use other names, like low and high instead of min_ and max_. I would put the game loop in a function, and call it from an if __name__ == '__main__' block. Note that you can use random.sample to get two unique numbers without having to code the loop in get_ghost.

From the user perspective it works fine, but I would add a description of the game. I was rather clueless playing it the first time.

Don't take this as too critical. The only thing that really bothers me is the single letter variable names.

Oh, and comments would be good.
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
Reply


Messages In This Thread
My version GhostGame - by anickone - Jun-18-2018, 08:52 PM
RE: My version GhostGame - by nilamo - Jun-18-2018, 08:58 PM
RE: My version GhostGame - by nilamo - Jun-18-2018, 08:59 PM
RE: My version GhostGame - by anickone - Jun-18-2018, 09:51 PM
RE: My version GhostGame - by ichabod801 - Jun-18-2018, 10:20 PM
RE: My version GhostGame - by anickone - Jun-20-2018, 06:25 PM
RE: My version GhostGame - by ichabod801 - Jun-20-2018, 08:44 PM
RE: My version GhostGame - by anickone - Jun-21-2018, 08:29 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020