Cobra: a Dragon 32 game from my past

About thirty years ago, my dad and I wrote a game for our Dragon 32 home computer. It was originally a pen and paper game for two players; in our version you played against the computer. I have tried to recreate the experience here. There is an old TV, with the Dragon connected, ready to be turned on. Any keys you need to press will appear in the beige strip underneath. There are some on-screen instructions, with extra information to the right, and also fuller instructions below. I have recreated the speed of the original, so remember to wait for the computer to make its move. Turn on the computer to start:

Power on!



The Dragon 32 has booted. Type CLOAD (by clicking on any of the CLOAD row of keys in the beige strip at the bottom) to load the game from tape.

The game is loading from cassette tape. This takes a few seconds.

The game has loaded. You can now start it by typing RUN (click on RUN at the bottom).

Choose whether you would like to go first by clicking on the Y or N key.

Square ‘A’ is to the right of the starting + and square ‘B’ is below it. Choose which you’d like to start in by clicking on the A or B key.

Your turn: Choose which piece to play by clicking on the chosen piece at the right of the screen. (No need to drag it.) Or you can choose by clicking on the 1, 2, or 3 key at the bottom.

The computer is thinking....

Game over! Choose whether you’d like another game by clicking on the Y or N key.

The program has finished and you’re back at the BASIC prompt. You can start the program again by typing RUN (click on the RUN keys). Sorry, no LIST.

Game instructions

In playing the game, a snake grows round the board. Players take turns to add a section to the snake. The piece replaces the head, and the snake will then turn left or right, or go straight on, depending on the piece. If the snake connects with pieces already on the board, it will carry on, maybe crossing over itself. A new head is then drawn where the line ends. You lose if you make the snake crash into the edge of the board, or into the fatal bottom-right square.

The best way to get to grips with the game is to give it a go, remembering to give the computer time to make its move before clicking for yours!

Writing the game

This pen-and-paper game had become a popular thing for us to do on, say, train journeys, so Dad and I chose it as a project to learn some programming. It took us many weeks, off and on, and I remember how satisfying it was when we got each part working.

Looking back now, I realise how much time Dad put in to this project, and how much effort my parents put into encouraging my interests in general. I'm very grateful to them.