That brings back some very fond memories. Another game included in MS-DOS was Nibbles. I still remember wrapping my head around how Nibbles worked, as the source code didn't seem to fit the actual logic being run. It just looked way too short and simple. That's before I discovered how to view the source code of functions in QBasic. Then it clicked.
The Internet Archive has these games available to play by the way: