--- title: "Egg Hunt" id: 72129 type: "computer_media" slug: "egg-hunt" url: "http://localhost/computer_media/egg-hunt/" markdown_url: "http://localhost/computer_media/egg-hunt.md" published_at: "2026-10-21T08:01:28+00:00" modified_at: "2026-10-21T08:01:28+00:00" author: "David Anderson" featured_image: url: "http://localhost/wp-content/uploads/2026/10/egg2-1.png" excerpt: "Sends a child around the house from clue to clue, checking each Easter egg's colour before giving the next hiding place, with a final surprise; parents set the places." post_tag: - name: "Downloadable" slug: "downloadable" taxonomy: "post_tag" url: "http://localhost/tag/downloadable/" - name: "TS 2068" slug: "ts2068" taxonomy: "post_tag" url: "http://localhost/tag/ts2068/" model: - name: "Timex/Sinclair 2068" slug: "ts-2068" taxonomy: "model" url: "http://localhost/model/ts-2068/" indiv: - name: "Joey Latimer" slug: "joey-latimer" taxonomy: "indiv" url: "http://localhost/indiv/joey-latimer/" genre: - name: "Holiday" slug: "holiday" taxonomy: "genre" url: "http://localhost/type/holiday/" media_type: "Program" programmers: - name: "Joey Latimer" slug: "joey-latimer" taxonomy: "indiv" url: "http://localhost/indiv/joey-latimer/" download_url: "https://archive.org/download/timex-sinclair-software-archive/Egg%20Hunt%20%281984%29%28Latimer%2C%20Joey%29%28TS2068%29%28US%29%28Program%29.zip" tsrun_member: "Egg Hunt (1984)(Latimer, Joey)(TS2068)(US)(Program)/Egg Hunt (1984)(Latimer, Joey)(TS2068)(US)(Program).tap" mediadate: "1984" images: - url: "http://localhost/wp-content/uploads/2026/10/egg2-1.png" - url: "http://localhost/wp-content/uploads/2026/10/egg2-2.png" - url: "http://localhost/wp-content/uploads/2026/10/egg2-4.png" article_media: - id: 8061 title: "Egg Hunt" type: "article" url: "http://localhost/article/egg-hunt/" media_type_tags: "Holiday" license: false --- # Egg Hunt Runs an Easter egg hunt around the house. The screen sends the child to a real place, such as under the kitchen sink, in the refrigerator or under their pillow, to find a coloured egg. Typing the egg’s colour and pressing ENTER brings up the next hiding place. After eight eggs, the last clue leads to a surprise in the parents’ room. Parents set up their own hunt by editing the places and colours in the `LET` lines 40–190, and the entry `END` marks the final clue. Colours must be typed in capitals. Egg Hunt is by Joey Latimer and was published as a type-in in Family Computing, April 1984. This copy was typed in from the ZX81 version of the listing. ## Program Analysis ### Structure Lines 10–20 dimension `p$(8,30)` for places and `c$(8,10)` for colours, and lines 40–190 fill them. The loop at 240–530 prints each clue, takes the colour with `INPUT`, prints “COLOR ACCEPTED” fifteen times on a match, and waits for ENTER. When `c$(r)` begins with `END`, line 540 congratulates the player and prints that entry’s place. ### Fixes for the 2068 The listing as found on the disk did not run correctly on a 2068, and the download has these fixes: - Lines 200, 380, 420 and 520 used `CLEAR` to clear the screen, which also wipes the clue arrays. They now use `CLS`. - Line 510 waited for `CHR$ 118`, the ZX81 NEWLINE code, which the 2068 keyboard never returns. It now waits for `CHR$ 13` (ENTER). - Line 190 set the end marker to lower-case `end`, while line 250 tests for `END`. It is now upper case. ## Notable Techniques - Line 370 compares the answer with `c$(r, TO LEN a$)`, which avoids the trailing spaces of the fixed-length array. - Line 250 slices `c$(r, TO 3)` to find the end marker without padding. ## Potential Issues - Because line 370 compares only the first `LEN a$` characters, any prefix is accepted. Pressing ENTER on an empty line matches every colour, and one letter such as `B` is accepted for BLUE. - An answer longer than ten characters is out of range for `c$(r, TO LEN a$)` and appears to stop the program with a subscript error. - If no entry is set to `END`, the loop ends with `r` at 9, and `p$(r)` in line 580 is out of range. This copy came from a Larken disk and was converted to load from tape. Along with the fixes above, the `RANDOMIZE USR 100` prefix and the LOGICALL menu load were removed, and the program now autostarts at line 10. It was tested in ZEsarUX through all eight eggs to “GREAT. YOU HAVE DONE IT.” ## Source Code ``` 10 DIM p$(8,30) 20 DIM c$(8,10) 30 REM 40 LET p$(1)= "UNDER THE KITCHEN SINK" 50 LET c$(1)="BLUE" 60 LET p$(2)="IN THE REFRIGERATOR" 70 LET c$(2)="GREEN" 80 LET p$(3)="UNDER YOUR PILLOW" 90 LET c$(3)="YELLOW" 100 LET p$(4)="IN YOUR SOCKS DRAWER" 110 LET c$(4)="RED" 120 LET p$(5)="IN THE BATHROOM" 130 LET c$(5)="ORANGE" 140 LET p$(6)="IN YOUR CLOSET" 150 LET c$(6)="WHITE" 160 LET p$(7)="IN THE MAILBOX" 170 LET c$(7)="PURPLE" 180 LET p$(8)="IN YOUR PARENTS ROOM" 190 LET c$(8)="end" 200 CLEAR 210 PRINT "WELCOME TO THE EASTER" 220 PRINT " EGG HUNT." 230 PRINT 240 FOR r=1 TO 8 250 IF c$(r, TO 3)="END" THEN GO TO 540 260 PRINT "LOOK..." 270 PRINT p$(r) 280 PRINT "FOR A COLORED" 290 PRINT "EASTER EGG." 300 PRINT 310 PRINT "TYPE THE COLOR OF" 320 PRINT "THE EGG, THEN" 330 PRINT "PRESS ." 340 PRINT 350 PRINT "WHAT IS THE COLOR?"; 360 INPUT a$ 370 IF a$ =c$(r, TO LEN a$) THEN GO TO 420 380 CLEAR 390 PRINT "SORRY, WRONG COLOR." 400 PRINT "PLEASE, TRY AGAIN." 410 GO TO 350 420 CLEAR 430 FOR t=1 TO 15 440 PRINT "COLOR ACCEPTED"; 450 NEXT t 460 PRINT 470 PRINT 480 PRINT "PRESS " 490 PRINT "TO CONTINUE." 500 LET r$=INKEY$ 510 IF r$<>CHR$ 118 THEN GO TO 500 520 CLEAR 530 NEXT r 540 PRINT "GREAT. YOU HAVE" 550 PRINT "DONE IT." 560 PRINT 570 PRINT "LOOK..." 580 PRINT p$(r) 590 PRINT "TO FIND A SURPRISE." 600 STOP 9992 RANDOMIZE USR 100: SAVE "HUNT.B1" 9998 RANDOMIZE USR 100: LOAD "L.B1" ```