Is it just me? It's not a good question, it shows lack of core coding experience. For example a video game consists of millions of possibilities/results in movement based on environment - it's not approached as a collection of thousands of if/then/else statements. In fact the movement of cows seems very much like video game coding, it needs a "cow engine".
I think it was a really good question. It showed that he had the intuitive instinct that there had to be a better way. He just didn't know how to ask for a "cow engine" by name.
Imagine being given a problem such as "add any two given integers but do not use math operators".
A person without anything but if/then/else knowledge would proceed to try to write
if (a==1 && b==2) c==3
and repeat it for every variation until they gave up.Someone with more core experience and coding instinct would immediately recognize there must be away to set patterns for 0-9 and then analyze each decimal place, apply a matrix, or a number of other approaches.