Computer Science Canada

guessing game

Author:  Jimbo 420 [ Thu Jun 01, 2006 12:46 pm ]
Post subject:  guessing game

guessing game

Author:  Clayton [ Thu Jun 01, 2006 5:16 pm ]
Post subject: 

typical guessing game, add colors, fonts, whatever you can think of, make a visible score/times guessed counter, whatever, dont worry, you werent the first person to post this game Rolling Eyes

Author:  _justin_ [ Thu Jun 01, 2006 9:15 pm ]
Post subject: 

eh jim that looks pretty good

but what you can do to impress mr.c is instead of
code:
var number, number2, counter : int
 number := Rand.Int (1, 100)


you could try

code:
var ,number2, counter :int
var number := Rand.Int (1, 100)


btw heres mine

code:
%Justin Yusek
%Tss Gr.10
%Friday Challenge



var num2, trys : int := 0
var num := Rand.Int (1, 100)

Draw.FillBox (0,0,maxx,maxy,black)
colorback (black)
color (78)

loop
    put "Try to geuss the number from 1-100:" ..
    get num2
    if num2 > num then
        put "Too high!! Try again"
    elsif num2 < num then
        put "Too low !! Try again"
    elsif num2 = num then
        exit
    end if
    trys += 1
    delay (750)
    cls
end loop

put "You got it in :", trys, " trys!"

Author:  Vertico [ Fri Jun 02, 2006 8:43 am ]
Post subject: 

Although it is simple, I've found this game (all versions of it) to be entertaining.

Pretty much everything SuperFreak82 said would help. Also you could try making it more complex in a sense. Instead of always having 0 - 100 you could ask the player for a min and max number they would like to guess between, or perhaps you could add in lives (four guesses to get the right answer or you lose) to increase the entertainment.

Or you could throw in a co-op mode where you can have player1 and player2 play to guess the number first.

Good luck Wink


: