11.07.2015 Views

Untitled - TRS-80 Color Computer Archive

Untitled - TRS-80 Color Computer Archive

Untitled - TRS-80 Color Computer Archive

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Amiga JigsawWalterBulawoThis short, elegant program is notonly an entertaining activity, but alsoa demonstration of valuable techniques for programming graphics inAmigaBASIC."Jigsaw" is a simple, but absorbing,BASIC game for the Amiga. Theprogram requires you to put togethera puzzle after its pieces have beenscattered around the screen. TheAmiga keeps track of the number ofmoves you make and the totalamount of time you take to complete the puzzle.Unshuffle The PiecesType in the program and save acopy to disk before you run it. Theprogram begins by drawing a puzzle shape in a small window in thecenter of the screen. Wait until yousee a shape that you like, then pressthe space bar. The Amiga then divides the picture into a number ofequally sized pieces, capturing eachpiece in a small square on thescreen. While this is being done,you should take advantage of theopportunity to memorize the puzzle's shape. After every piece hasbeen captured, the computer shuffles them at random. Begin playingwhen the center of the screen iscleared.Your goal is to reconstruct thepicture by placing every piece in itsoriginal position, using the mouseto move pieces. To pick up a piece,move the mouse pointer over thepiece, then press the left button andhold it down. The piece blinksbriefly, and the computer emits abeep to indicate that you have thepiece. Continue to hold down themouse button as you move thepiece to its destination. When youhave positioned the piece, releasethe button. The square blinks a second time to signal that it has beenplaced. Continue this process untilthe entire picture is constructed.When you solve the puzzle, theprogram lets you play again or quit.The bottom of the screen contains two counters: a timer that updates continuously and a movecounter that shows how many turnsyou have taken. To increase thegame's difficulty and add to itsvisual appeal, the computer alsocontinuously rotates the palettecolors of the puzzle pieces.You must place each piece reasonably close to the desired destination square, but you need not lineit up exactly. If the piece is closeenough for the computer to tellwhich location you intend, the program automatically "snaps" it intoperfectalignment.If you find yourself stumped,you can peek at the original puzzlefor a moment, and then return tothe puzzle screen. This is done withthe back-window and front-windowgadgets located at upper left of thewindow border. To peek at theoriginal, unscrambled puzzle, clickthe left button once on the backwindowgadget. To return to the"Amiga Jigsaw" is an absorbingchallenge to puzzle fans of all ages.puzzle screen, click the left buttononce on the front-window gadget.There is no penalty for peeking.However, keep in mind that thetimer continues to tick while youstudy the original shape.Beginning puzzlers shouldavoid puzzles that include largeareas of blank space. Blank squaresmay look identical to you, but thecomputer remembers the originallocation of each piece and won't endthe game until you place each one inthe correct spot. Thus, a puzzle thatcontains mostly blank space can benearly impossible to solve.Bobs And OBJECTProgrammers may wish to studythe way that this program movesand places graphic shapes on thescreen. One technique that mighthave been used is to GET eachshape into a variable and PUT it on46 COMPUTE) February 1987

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!