You all remember the childhood game of Hot-and-Cold. We are going to reuse the Etch-a-Turtle code to play this game on the screen. Each time measure how far the turtle is from some secret spot of your choosing. (If the spot was in a different location for each game that would be really cool.) If the turtle moves closer to the secret spot print "HOTTER." If the turtle moves away from the secret spot print "COLDER." If there is no change print "MEH." If the turtle is as close as it can possible get with your setup print a congratulatory message, place a big dot on the secret spot, and ask the user if they would like to play again. (Feel free to personalize the messages on any assignment. Keep us entertained.)
Console
Direction: w
HOTTER
Direction: w
HOTTER
Direction: w
HOTTER
Direction: w
HOTTER
Direction: w
COLDER
Direction: d
COLDER
Direction: s
HOTTER
Direction: a
HOTTER
Direction: a
HOTTER
Direction: a
HOTTER
Direction: a
HOTTER
Direction: a
HOTTER
Direction: a
HOTTER
Direction: a
YOU WIN!
PRESS X TO QUIT. ANYTHING ELSE CONTINUES.
X