Page 1 of 1

New game uploaded: Animal guessing game

Posted: Wed Feb 24, 2021 10:02 pm
by desertfish



Animal guessing game




View File






After seeing others post conversions of classic basic programs, I remembered this one where the computer plays an animal guessing game with you.

It tries to guess your secret animal by asking questions about it, and if it doesn't know the animal, it asks about your chosen animal so it knows about it the next round!

(It's basically building a binary search tree)

note: all knowledge is lost when the program exits. (maybe I'll make a future version where it can save/load the animals and questions)

Source code is here: https://github.com/irmen/prog8/blob/master/examples/animals.p8