shanenin Posted June 13, 2005 Report Share Posted June 13, 2005 Is this game good enough to sell for profit? so long as you use integers(whole numbers) the game seems to work bug free. If I can't sell it, at least I had a fun time writing it :-)#!/usr/bin/python# this is a program to make the computer guess the number # I chose between a interactively chosen range# This was programmed completely by# shane lindbergprint\"""This program allows you to play a guessing game against the computer. This is like the game "high/low" you played as a kid. You need to make the following rules. Pick a number that the computer will try to guess. To make it a little easier for the computer, you also need to specify a range that the number is between.""" print "Enter a number that will be used for the low end of the range"low_range = int(raw_input(">"))print "Enter a number at least two counts higher then",low_rangeprint "this will be used for your high range"high_range = int(raw_input(">")) # the following while statemant is supposed to check if the high_range variable # is at least two counts higher then the low_range variable. If it is not two# counts higher, it askes for a new numberwhile (high_range <= low_range + 1): print "please enter a number higher then",low_range +1 high_range = int(raw_input(">")) print "\nplease choose a number between",low_range,"and",high_range,"."print "this number can not include either",low_range,"or",high_rangenumber = int(raw_input(">"))while (number <= low_range) or (number >= high_range): print "please choose a number between",low_range,"and",high_range,"." number = int(raw_input(">")) print "computer, please guess my number, it is between",low_range,"and",high_rangeprint "this number does not include",low_range,"or",high_range# this next algorythm allows the computer to guess logically what my chosen # number isguess =""count = 0while (guess != number): guess = (high_range -((high_range - low_range + 1)/2)) print "\n\nthe computer guesses",guess raw_input("press enter to continue") if (guess > number): high_range = guess print "\nyou tell the computer, LOWER" if (guess < number): low_range = guess print "\nyou tell the computer, HIGHER" count += 1print "the computer guessed the number",guess,"in",count,"trie(s)" Quote Link to post Share on other sites
Matt Posted June 13, 2005 Report Share Posted June 13, 2005 Could you attach a compiled file of the game?As for profit.. you have to assume that users will not use whole numbers. I cannot judge by quality (because I have yet to play it) but with the bug possibilites of non-whole numbers, you may have trouble selling it.Once I play it, I can give you a better opinion. Matt Quote Link to post Share on other sites
shanenin Posted June 13, 2005 Author Report Share Posted June 13, 2005 Could you attach a compiled file of the game?As for profit.. you have to assume that users will not use whole numbers. I cannot judge by quality (because I have yet to play it) but with the bug possibilites of non-whole numbers, you may have trouble selling it.Once I play it, I can give you a better opinion. Matt<{POST_SNAPBACK}>I was just kidding(maybe you are also), I was just trying to be funny. I was also proud of my infantile game, so I was looking for any reason to post it :-)As for playing it, if you have python installed on your windows computer it should play as is. I know there is a way to make a executable that will allow you to play it even if you do not have python installed. I will check into that. Quote Link to post Share on other sites
iccaros Posted June 16, 2005 Report Share Posted June 16, 2005 Could you attach a compiled file of the game?As for profit.. you have to assume that users will not use whole numbers. I cannot judge by quality (because I have yet to play it) but with the bug possibilites of non-whole numbers, you may have trouble selling it.Once I play it, I can give you a better opinion. Matt<{POST_SNAPBACK}>I was just kidding(maybe you are also), I was just trying to be funny. I was also proud of my infantile game, so I was looking for any reason to post it :-)As for playing it, if you have python installed on your windows computer it should play as is. I know there is a way to make a executable that will allow you to play it even if you do not have python installed. I will check into that.<{POST_SNAPBACK}>good Job ... you can also make gui's with python.. which would make ht egame less prone to error as they could pick a number..see this site for hwo easy it is..tk is ugly but is a start..http://www-106.ibm.com/developerworks/library/l-tkprg/ Quote Link to post Share on other sites
flashh4 Posted June 16, 2005 Report Share Posted June 16, 2005 # 5 Quote Link to post Share on other sites
shanenin Posted June 16, 2005 Author Report Share Posted June 16, 2005 this book I have is pretty cool. with every chapter some new ideas are introduced, then you use those ideas for a game. By the end of the book I should be able o make a basic gui game. In all honesty, I will probably get overwelmed(confused) come chapter 7 or so, will see :-) Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.