I have finished writing a BASIC implementation of a tic-tac-toe game. There are lots of ways it could be improved or modified, and the Badb has already told me she’d be interested in a tic-tac-toe program. I’ve printed it out on paper so she can type it in, herself. This is how I learned to program: by transcribing programs written by other people, with a mixture of good and bad habits. Things that were important became clear, and things that were not important also became clear. I’ve posted the program to this site so that if you, too, would like your kid (or heck, even you, yourself) to transcribe a program and play with it you can have the opportunity.
Here are some suggestions for changes, in no particular order of difficulty:
- Instead of requiring the enter key for responses, use looping and inkey$() to get user responses
- Instead of grid coordinates, map each cell to a single digit (play from the number keys)
- Allow for two humans to take turns at the keyboard, using the computer as a very expensive paper and pencil
- Have the program loop back to the beginning after a game is over so you don’t have to type “run” every time
Feel free to add your own suggestions in the comments.