As it's written, it's a bit immature. Fortunately, it's easy to modify!
Try having older students choose several objects to step to, then secretly selecting one of those objects to be the finish line. Then, let groups work together to come up with signals for stepping in different directions.
As a further challenge, have the older students give the entire program before the "robot" can start walking. All of these challenges make this exercise even more pertinent to computer science.