_______________________________________________________________________________ __ __ __ __ / \ __ __| __ |__ _ __ __ __ | _ __ _ __ | / \ / | /__\ | \ | /__\ __\ |_/ /__\ | \__/ \__/ \__| \__ _|__/ _|_ \__ <__| _| \ \__ _|_ A brain-stretching type-in of logic and luck _______________________________________________________________________________ This month's keyboard epic is a game to get your brain working overtime. The game isn't new - you may know it as Mastermind or Cows & Bulls - but author PAUL TAYLOR has turned it into a bright, snappy program for you to pit your wits against. The object of the game is to guess a sequence of five coloured pegs - the code - which Arnold has secretly thought up. This is no easy task, for you must guess not only the pegs that make up the code, but also the order they are in. To make matters worse, there are eight different kinds of peg, and Arnold is quite happy to use the same sort more than once in any given code. That makes over 32000 possible codes, and you only get ten guesses; this is where the brainwork comes in. -------------------+ How to play | -------------------+ On the left-hand side of the screen is a record of your guesses so far; on the right are the options available to you. Using the up and down cursor keys you can move the right-hand flashing arrow cursor to select which kind of peg to put in your next guess. You can then choose the peg's position in the guess by moving the left-hand cursor, using the left and right cursor keys. Once you're satisfied with the type and position of a peg, press to put it in place. Having selected all five pegs in this way, move the options cursor to the question mark. Now press again, to try your sequence. Every time you make a guess, Arnold gives it a 'score'. This consists of a series of little smiley faces which appear next to the guess, one for each correct peg. A white smiley means a peg which is of the right type but in the wrong place, while a black one indicates a peg correct in both type and position. There is no indication, however, of which pegs in your guess the smileys refer to - you have to work that out from the on-screen record of guesses and scores. To get the coveted five black smileys of a correct guess, you'll need a lot of concentration and a fair slice of deductive logic. If the suspense gets too much for you, move the options cursor to the frowning face and press . Arnold will reveal that elusive sequence - you can then grind your teeth, as you realise where you went wrong. _____________________________________________________________________________ | | | Typing it in | | Although this isn't a terribly long listing - just over 3K - please take | | care over typing it in. Be specially careful with DATA statements, and make | | sure to copy exactly both punctuation and spacing. | | It's worth saving the program every so often as a safety precaution, | | and certainly worth saving it before you run it. Remember that a message | | such as 'Overflow error in line 390' does not mean that the error is in | | that particular line - it could mean that you've made a mistake anywhere. | |_____________________________________________________________________________| _____________________________________________________________________________ | | | Green screen blues | | If you use a green screen, you'll find the colours of the different pegs | | hard to tell apart - to remedy this, substitute the alternative line 420 | | for the one already in the program. For the programmers among you, line 420 | | is the colour data. The first number is the code for the background colour, | | and the remaining eight numbers are the peg colours. | | If you do decide to alter the peg colours, note that the 'correct | | position' smiley will be the same colour as the first peg, and the | | 'incorrect position' one the same as the eighth. Set them to the same | | colour, and you'll have a much harder game on your hands! | |_____________________________________________________________________________| _____________________________________________________________________________ | | | 420 DATA 13,0,0,9,9,17,17,26,26 | |_____________________________________________________________________________| / o o / / [Listing - CODE.BAS] / / o o /