_Title "One Key Screen 0 Halloween Crypt-O-Gram" ' b+ 2021-10-21
Const Xmax
= 120 ' AKA _Width to allow jokes upto 120 chars long, longest is 110 so far. Const Ymax
= 30 ' AKA _Height some
' for Cryptogram game
Dim Shared Answer$
' beginning phrase to be guessed ' 3 stages of the Puzzle Dim Shared Working$
' decoded and solved when working$ becomes = ucase$(answer$) Dim Shared Letters$
(1 To 26) ' for coding and highlited letters Dim Shared LCodes$
(1 To 26) ' for code and decode by number 1 to 26 Dim Shared Guesses$
(1 To 26) ' track all the guess to decode Dim Shared HighLited
' cursor over letters to guess Dim Shared Mode
' what are we getting a coded letter =0, a guess for that letter =1, a letter to find and decode=3 Dim Shared KeyTimer
' setup for Choice$ calls Dim Shared Place
' ditto tracks highlight location from selections
'txt image
LoadWitches
' main declares
Dim jokes$
(1 To 100) ' load jokes one time from data statements in program Dim HH&
, SW&
, WH&
, ZB&
' sound and font Dim As Integer pl
, pr
, pt
, pb
, px
, py
, pdx
, pdy
, weCol
, wwCol
' the pumkin as a ball
' load sounds
HH&
= _SndOpen("happy-halloween-scary-creepy-music-1382.mp3")
_FullScreen 'I guess it does make it easier to tell E from F... For i
= 1 To 100 'ready jokes
'set pumpkin as ball boundaries
pl
= 19: pr
= _Width - 18: pt
= 1: pb
= 16Splash nSplash
restart:
px
= 19: py
= 8: weCol
= 5: wwCol
= _Width - 15: pdx
= 1: pdy
= -1
'setup Puzzle and code it
Answer$
= jokes$
(Int(Rnd * jCount
) + 1)For i
= 1 To 26: Guesses$
(i
) = "-":
Next 'setup the display guesses array For i
= 1 To 26 ' use letters for display of letters to pick second and to create a code Letters$
(i
) = Chr$(i
+ 64) LCodes$(i) = Letters$(i) ' these will convert between each other by index number
For i
= 26 To 2 Step -1 ' shuffle the letters in LCode$() Coded$ = "": Working$ = "" ' reset for next go around
For i
= 1 To Len(Answer$
) 'third: put the phrase in coded$ and hide it in working$ Coded$ = Coded$ + LCodes$(a - 64)
Working$ = Working$ + "*"
Coded$
= Coded$
+ Mid$(Answer$
, i
, 1) Working$
= Working$
+ Mid$(Answer$
, i
, 1)
HighLited
= 1: Mode
= 0: KeyTimer
= Timerloopcnt = 0
DisplayInstructions
Update
k$ = Choice$(25, 33, " A B C D E F G H I J K L M N O P Q R S T U V W X Y Z ")
k$ = Choice$(25, 29, " 1 2 3 4 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z ")
If Mode
= 0 Then ' highlight a letter 'm replaces arrows and mouse select of highlited 1 to 26 for letters
test
= InStr("ABCDEFGHIJKLMNOPQRSTUVWXYZ", k$
) HighLited = test
Mode = 1
Mode = 0
Guesses$(HighLited) = k$ ' for screen updates
If Letters$
(HighLited
) = Mid$(Coded$
, i
, 1) Then Mid$(Working$
, i
, 1) = k$
Mode = 0
c$
= LCodes$
(Asc(k$
) - 64) Guesses$
(Asc(c$
) - 64) = k$
Mode = 0
loopcnt = loopcnt + 1
px = px + pdx
pdx = -pdx
px = px + pdx
py = py + pdy
pdy = -pdy
py = py + pdy
DrawWitch "e", py - 4, weCol
DrawWitch "w", py - 4, wwCol
DrawPumpkin py, px
Update
CP 19, "You got it! 5 secs to next puzzle..."
nSplash = nSplash + 1
If nSplash
> 10 Then nSplash
= 0 Splash nSplash
do1: ' display answer
Working$
= UCase$(Answer$
) ' show the answer$ guesses correct moves to next puzzleMode = 0
do2: ' get decode letter for highlighted Letter
Guesses$(HighLited) = c$ ' for screen updates
If Letters$
(HighLited
) = Mid$(Coded$
, i
, 1) Then Mid$(Working$
, i
, 1) = c$
Mode = 0
do4: ' clear guess letter from code letter
Guesses$(HighLited) = "-"
If Letters$
(HighLited
) = Mid$(Coded$
, i
, 1) Then Mid$(Working$
, i
, 1) = "*" ' clear the letter Mode = 0
'one liners
Data "Why do ghosts go on diets? So they can keep their ghoulish figures" Data "Where does a ghost go on vacation? Mali-boo." Data "Why did the ghost go into the bar? For the Boos." Data "What is in a ghost's nose? Boo-gers." Data "Why did the policeman ticket the ghost on Halloween? It didn't have a haunting license." Data "Why do demons and ghouls hang out together? Because demons are a ghoul's best friend!" Data "Why did the ghost starch his sheet? He wanted everyone scared stiff." Data "What does a panda ghost eat? Bam-BOO!" Data "What's a ghost's favorite dessert? I-Scream!" Data "Where do ghosts buy their food? At the ghost-ery store!" Data "How do you know when a ghost is sad? He starts boo hooing." Data "Why don't mummies take time off? They're afraid to unwind." Data "Why did the headless horseman go into business? He wanted to get ahead in life." Data "What kind of music do mummies like listening to on Halloween? Wrap music." Data "Why don't mummies have friends? Because they're too wrapped up in themselves." Data "Why did the vampire read the newspaper? He heard it had great circulation." Data "How do vampires get around on Halloween? On blood vessels." Data "What's it like to be kissed by a vampire? It's a pain in the neck." Data "What's it called when a vampire has trouble with his house? A grave problem." Data "How can you tell when a vampire has been in a bakery? All the jelly has been sucked out of the jelly doughnuts." Data "What do you get when you cross a vampire and a snowman? Frostbite." Data "Why do skeletons have low self-esteem? They have no body to love." Data "Know why skeletons are so calm? Because nothing gets under their skin." Data "What do you call a cleaning skeleton? The grim sweeper." Data "What do skeletons order at a restaurant? Spare ribs." Data "What do you call a witch's garage? A broom closet." Data "What kind of food would you find on a haunted beach? A sand-witch!" Data "What was the witch's favorite subject in school? Spelling." Data "What do you call two witches who live together? Broom-mates!" Data "What's a witch's favorite makeup? Ma-scare-a." Data "Who helps the little pumpkins cross the road safely? The crossing gourd." Data "What treat do eye doctors give out on Halloween? Candy corneas." Data "What type of plants do well on all Hallow's Eve? Bam-BOO!" Data "What do birds say on Halloween? Trick or tweet!" Data "Why don't skeletons ever go trick or treating? Because they have no-body to go with." Data "Where do ghosts buy their Halloween candy? At the ghost-ery store!" Data "What do owls say when they go trick or treating? 'Happy Owl-ween!'" Data "What do ghosts give out to trick or treaters? Booberries!" Data "Who did Frankenstein go trick or treating with? His ghoul friend." Data "What Halloween candy is never on time for the party? Choco-LATE!" Data "What do witches put on to go trick or treating? Mas-scare-a." Data "What does Bigfoot say when he asks for candy? 'Trick-or-feet!'" Data "Which type of pants do ghosts wear to trick or treat? Boo jeans." Data "What makes trick or treating with twin witches so challenging? You never know which witch is which!" Data "What happens when a vampire goes in the snow? Frost bite!" Data "What do you call two witches living together? Broommates" Data "What position does a ghost play in hockey? Ghoulie." Data "What do mummies listen to on Halloween? Wrap music." Data "How do you make a skeleton laugh? You tickle his funny bone!" Data "Which Halloween monster is good at math? Count Dracula!" Data "Why did the Cyclops give up teaching? He only had one pupil!" Data "Why didn't the skeleton go to see a scary movie? He didn't have the guts." Data "What did the boy ghost say to the girl ghost? 'You sure are boo-tiful!'" Data "Where does Dracula keep his money? In a blood bank." Data "Why are ghosts terrible liars? You can see right through them!" Data "Why don't mummies take vacations? They're afraid to unwind." Data "What is a vampire's favorite holiday, besides Halloween? Fangs-giving!" Data "Where do fashionable ghosts shop? Bootiques!" Data "What's a monster's favorite play? Romeo and Ghouliet!" Data "What room does a ghost not need? A living room." Data "What monster plays tricks on Halloween? Prank-enstein!" Data "What's a ghost's favorite dessert? I scream." Data "What does the skeleton chef say when he serves you a meal? 'Bone Appetit!'" Data "What is a vampire's favorite fruit? A neck-tarine!" Data "What do witches put on their bagels? Scream cheese." Data "What do ghosts eat for dinner? Spook-ghetti!" Data "What do skeletons order at restaurants? Spare ribs." Data "What does a panda ghost eat? Bam-BOO!" Data "What tops off a mummy's ice cream sundae? Whipped scream." Data "What's a ghost's favorite yogurt flavor? Boo-berry!" Data "What's a vampire's least favorite meal? A steak!" Data "Why was the candy corn booed off the stage? All of his jokes were too corny!" Data "What happened to the cannibal who showed up late to Halloween dinner? They gave him the cold shoulder." Data "What happens if you combine a vampire and a snowman? You get frostbite." Data "Do zombies eat popcorn with their fingers? No, they like to eat the fingers separately." Data "What happened to the man who got behind on payments to his exorcist? He got repossessed." Data "Where do most ghouls and goblins live in 2019? In North and South Scarolina." Data "Why did the team of witches lose the softball game? Their bats kept flying away." Data "What do you call six witches in a jacuzzi? A self cleaning coven." Data "Why was the vampire in a bad mood? Too much B negative." Data "What did the parent say to the baby ghost? Don't spook until your spoken too." Data "What is a vampire's favorite flavor of ice cream? Veinilla." Data "What are two freshly married spiders called? Newly-webbed." Data "Why hasn't anyone ever seen ghost poop? Because it's invisible." Data "You know it's bad luck to be followed by a black cat… if you are a mouse." Data "Where do most most werewolves live in 2019? Howlywood California." Data "Why don't witches have babies? Their husbands have crystal balls." Data "Why can't the ghost have any children? He has a Halloweenie."
Sub Update
' preserve from ravages of graphics effects ;-)) w$
= Mid$(Working$
, i
, 1): c$
= Mid$(Coded$
, i
, 1) a$
= Mid$(Answer$
, i
, 1): h$
= Letters$
(HighLited
) spaces = 9
For i
= 1 To 26 'blue background highlighter spaces = spaces + 4
CP 24, " Guess Solve Letter or Menu # "
CP 24, " Select Code Letter or Menu # "
CP 24, " Select Letter to Find "
CP 4, "*** Halloween Challenge - Crypt-O-Gram Puzzle ***"
'Color Red
CPRC 7, "Solve puzzle by selecting a Code letter then selecting a Guess letter for it."
CPRC 8, "All selections are made by pressing the spacebar until you are on your choice."
CPRC 9, "Use the escape key to quit immediately."
'Color 2
c = 34
LPRC 11, c, "Select 1 to get the answer and move onto next puzzle."
LPRC 12, c, "Select 2 to decode current highlighted letter."
LPRC 13, c, "Select 3 to solve a letter, then select letter to find."
LPRC 14, c, "Select 4 to clear a guess at highlighted Code letter."
Sub CP
(row
, s$
) ' center text on text screen
Sub CPRC
(row
, s$
) ' center text on text screen and print in random colors
Sub LP
(row
, col
, s$
) ' Locate and Print
Sub LPRC
(row
, col
, s$
) ' Locate and print with Random colors
If Timer - KeyTimer
>= 3 Then Choice$
= Mid$(selection$
, Place
+ 1, 1): Place
= 0
show:
'_Display will take place in loop that called Choice$
rColor% = 4
rColor% = 13
rColor% = 2
rColor% = 6
rColor% = 12
first
= 11: last
= 32:
GoSub getText
first
= 32: last
= 46:
GoSub getText
first
= 46: last
= 57:
GoSub getText
first
= 57: last
= 75:
GoSub getText
first
= 75: last
= 100:
GoSub getText
first
= 100: last
= 111:
GoSub getText
first
= 111: last
= 130:
GoSub getText
first
= 131: last
= 159:
GoSub getText
first
= 159: last
= 180:
GoSub getText
first
= 180: last
= 193:
GoSub getText
CP 29, "... Spacebar Only! ..."
getText:
nlines = last - first
startRow
= Int((30 - nlines
) / 2) If i
>= first
And i
<= last
Then LP i
- first
+ startRow
+ 1, 25, RTrim$(s$
)
Sub DrawWitch
(WhichWitch$
, row
, col
) ' 7 lines 12 cols set color If Mid$(WitchE
(r
), c
, 1) <> " " Then LP row
+ r
- 1, col
+ c
- 1, Mid$(WitchE
(r
), c
, 1) If Mid$(WitchW
(r
), c
, 1) <> " " Then LP row
+ r
- 1, col
+ c
- 1, Mid$(WitchW
(r
), c
, 1)
Sub DrawPumpkin
(row
, col
) ' mid pumkin p$ = "((|))"
LP row + r, col, ","
LP row
+ r
, col
+ c
, Mid$(p$
, c
+ 3, 1)