New game uploaded: Animal guessing game

All aspects of programming on the Commander X16.
Post Reply
User avatar
desertfish
Posts: 1125
Joined: Tue Aug 25, 2020 8:27 pm
Location: Netherlands

New game uploaded: Animal guessing game

Post 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






 
Post Reply