Guessing Game - GameMaker, Tony Forster
Mainly done with graphical drag&drop programming but had to use a little text based programming, here is the pseudocode:
Create Event:
set variable tries to 0
set variable thenumber to round(random(100))
repeat next action (block) 100 times
set variable tries relative to 1
set variable guess to get_integer("your guess?","")
if expression guess=thenumber is true
display message: "Correct in " +string(tries) +" tries"
end the game
if expression guess<thenumber is true
display message: too low
else
display message: too high
display message: Can't get it after 100 tries!
end the game
heres the drag&drop
Comments (0)
You don't have permission to comment on this page.