Author Topic: One Key Screen 0 Halloween Crypt-O-Gram  (Read 3276 times)

0 Members and 1 Guest are viewing this topic.

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
One Key Screen 0 Halloween Crypt-O-Gram
« on: October 21, 2021, 01:44:45 pm »
Better get this posted before I forget I have it done. This is pure Screen 0, one key, Halloween Theme Crypt-O-Gram Puzzles, no graphics. The Crypto-O-grams are all one liner Halloween jokes. While you solve the puzzle, 2 witches play Infinite Pong with a pumpkin in ASCII Art. Nice music included in zip with other sound effects and ASCII txt files.

.bas Source
Code: QB64: [Select]
  1. _Title "One Key Screen 0 Halloween Crypt-O-Gram" ' b+  2021-10-21
  2.  
  3. Const Xmax = 120 ' AKA _Width to allow jokes upto 120 chars long, longest is 110 so far.
  4. Const Ymax = 30 ' AKA _Height some
  5.  
  6. Const Orange = 12
  7. Const White = 15
  8. Const Yellow = 14
  9. Const Back = 8
  10. Const Red = 4
  11. Const Blue = 9
  12. Const Green = 10
  13. Const BB = 6
  14.  
  15. ' for Cryptogram game
  16. Dim Shared Answer$ '  beginning phrase to be guessed    '   3 stages of the Puzzle
  17. Dim Shared Coded$ '   hidden in code
  18. Dim Shared Working$ ' decoded and solved when working$ becomes = ucase$(answer$)
  19. Dim Shared Letters$(1 To 26) ' for coding and highlited letters
  20. Dim Shared LCodes$(1 To 26) '  for code and decode by number 1 to 26
  21. Dim Shared Guesses$(1 To 26) ' track all the guess to decode
  22. Dim Shared HighLited ' cursor over letters to guess
  23. Dim Shared Mode ' what are we getting a coded letter =0, a guess for that letter =1, a letter to find and decode=3
  24. Dim Shared KeyTimer ' setup for Choice$ calls
  25. Dim Shared Place ' ditto tracks highlight location from selections
  26.  
  27. 'txt image
  28. Dim Shared WitchE(1 To 7) As String * 12
  29. Dim Shared WitchW(1 To 7) As String * 12
  30. LoadWitches
  31.  
  32. ' main declares
  33. Dim jokes$(1 To 100) ' load jokes one time from data statements in program
  34. Dim As Integer i, jCount, a, test, nSplash
  35. Dim r$, k$, c$
  36. Dim HH&, SW&, WH&, ZB& ' sound and font
  37. Dim As Integer pl, pr, pt, pb, px, py, pdx, pdy, weCol, wwCol ' the pumkin as a ball
  38.  
  39. ' load sounds
  40. HH& = _SndOpen("happy-halloween-scary-creepy-music-1382.mp3")
  41. SW& = _SndOpen("smich.wav")
  42. WH& = _SndOpen("Wolves Howling.wav")
  43. ZB& = _SndOpen("Zen Bell.wav")
  44.  
  45. Width Xmax, Ymax
  46. _FullScreen 'I guess it does make it easier to tell E from F...
  47. _PaletteColor 12, _RGB32(255, 128, 0) ' Orange
  48. _PaletteColor 13, _RGB32(180, 90, 45) ' for rColors
  49. For i = 1 To 100 'ready jokes
  50.     Read r$
  51.     If r$ <> "EOD" Then jokes$(i) = r$: jCount = jCount + 1 Else Exit For
  52.  
  53. 'set pumpkin as ball boundaries
  54. pl = 19: pr = _Width - 18: pt = 1: pb = 16
  55. Splash nSplash
  56.  
  57. restart:
  58. px = 19: py = 8: weCol = 5: wwCol = _Width - 15: pdx = 1: pdy = -1
  59.  
  60. 'setup Puzzle and code it
  61. Answer$ = jokes$(Int(Rnd * jCount) + 1)
  62. For i = 1 To 26: Guesses$(i) = "-": Next 'setup the display guesses array
  63. For i = 1 To 26 ' use letters for display of letters to pick second and to create a code
  64.     Letters$(i) = Chr$(i + 64)
  65.     LCodes$(i) = Letters$(i) ' these will convert between each other by index number
  66. For i = 26 To 2 Step -1 ' shuffle the letters in LCode$()
  67.     Swap LCodes$(i), LCodes$(Int(Rnd * i) + 1)
  68. Coded$ = "": Working$ = "" ' reset for next go around
  69. For i = 1 To Len(Answer$) 'third: put the phrase in coded$ and hide it in working$
  70.     a = Asc(UCase$(Answer$), i)
  71.     If a >= 65 And a <= 90 Then
  72.         Coded$ = Coded$ + LCodes$(a - 64)
  73.         Working$ = Working$ + "*"
  74.     Else
  75.         Coded$ = Coded$ + Mid$(Answer$, i, 1)
  76.         Working$ = Working$ + Mid$(Answer$, i, 1)
  77.     End If
  78.  
  79. HighLited = 1: Mode = 0: KeyTimer = Timer
  80. _SndLoop HH& '          setup done start game
  81. loopcnt = 0
  82.     Color Orange, Back: Cls
  83.     DisplayInstructions
  84.     Update
  85.     If Rnd < .0005 Then _SndPlay WH&
  86.     If Rnd < .0005 Then _SndPlay SW&
  87.     If Mode = 3 Then
  88.         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 ")
  89.     Else
  90.         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 ")
  91.     End If
  92.     If k$ <> "" And k$ <> " " Then
  93.         If Mode = 0 Then ' highlight a letter
  94.             'm replaces arrows and mouse select of highlited 1 to 26 for letters
  95.             test = InStr("ABCDEFGHIJKLMNOPQRSTUVWXYZ", k$)
  96.             If test > 0 Then
  97.                 HighLited = test
  98.                 Mode = 1
  99.             Else
  100.                 test = InStr("1234", k$)
  101.                 If test > 0 Then
  102.                     Select Case test
  103.                         Case 1: GoSub do1
  104.                         Case 2: GoSub do2
  105.                         Case 3: Mode = 3
  106.                         Case 4: GoSub do4
  107.                     End Select
  108.                 Else
  109.                     Mode = 0
  110.                 End If
  111.             End If
  112.         ElseIf Mode = 1 Then
  113.             Select Case Asc(k$)
  114.                 Case 49: GoSub do1
  115.                 Case 50: GoSub do2
  116.                 Case 51: Mode = 3
  117.                 Case 52: GoSub do4
  118.                 Case 65 TO 90
  119.                     Guesses$(HighLited) = k$ ' for screen updates
  120.                     For i = 1 To Len(Working$)
  121.                         If Letters$(HighLited) = Mid$(Coded$, i, 1) Then Mid$(Working$, i, 1) = k$
  122.                     Next
  123.                     Mode = 0
  124.             End Select
  125.         ElseIf Mode = 3 Then
  126.             Locate 25, 44: Print Space$(31); ' clear out old line
  127.             c$ = LCodes$(Asc(k$) - 64)
  128.             Guesses$(Asc(c$) - 64) = k$
  129.             For i = 1 To Len(Working$)
  130.                 If c$ = Mid$(Coded$, i, 1) Then Mid$(Working$, i, 1) = k$
  131.             Next
  132.             Mode = 0
  133.         End If
  134.     End If
  135.     loopcnt = loopcnt + 1
  136.     If loopcnt Mod 5 = 0 Then ' move pumpkin
  137.         If px + pdx >= pl And px + pdx <= pr Then
  138.             px = px + pdx
  139.         Else
  140.             pdx = -pdx
  141.             px = px + pdx
  142.         End If
  143.         If py + pdy >= pt And py + pdy <= pb Then
  144.             py = py + pdy
  145.         Else
  146.             pdy = -pdy
  147.             py = py + pdy
  148.         End If
  149.     End If
  150.     DrawWitch "e", py - 4, weCol
  151.     DrawWitch "w", py - 4, wwCol
  152.     DrawPumpkin py, px
  153.     _Limit 30
  154.     _Display
  155. Loop Until Working$ = UCase$(Answer$)
  156. Update
  157. Color Orange, Back
  158. CP 19, "You got it!    5 secs to next puzzle..."
  159. nSplash = nSplash + 1
  160. If nSplash > 10 Then nSplash = 0
  161. Splash nSplash
  162. GoTo restart
  163.  
  164. do1: ' display answer
  165. Working$ = UCase$(Answer$) ' show the answer$ guesses correct moves to next puzzle
  166. Mode = 0
  167.  
  168. do2: ' get decode letter for highlighted Letter
  169. For i = 1 To 26
  170.     If LCodes$(i) = Letters$(HighLited) Then c$ = Chr$(i + 64): Exit For
  171. Guesses$(HighLited) = c$ ' for screen updates
  172. For i = 1 To Len(Working$)
  173.     If Letters$(HighLited) = Mid$(Coded$, i, 1) Then Mid$(Working$, i, 1) = c$
  174. Mode = 0
  175.  
  176. do4: ' clear guess letter from code letter
  177. Guesses$(HighLited) = "-"
  178. For i = 1 To Len(Working$)
  179.     If Letters$(HighLited) = Mid$(Coded$, i, 1) Then Mid$(Working$, i, 1) = "*" ' clear the letter
  180. Mode = 0
  181.  
  182. 'one liners
  183. Data "Why do ghosts go on diets? So they can keep their ghoulish figures"
  184. Data "Where does a ghost go on vacation? Mali-boo."
  185. Data "Why did the ghost go into the bar? For the Boos."
  186. Data "What is in a ghost's nose? Boo-gers."
  187. Data "Why did the policeman ticket the ghost on Halloween? It didn't have a haunting license."
  188. Data "Why do demons and ghouls hang out together? Because demons are a ghoul's best friend!"
  189. Data "Why did the ghost starch his sheet? He wanted everyone scared stiff."
  190. Data "What does a panda ghost eat? Bam-BOO!"
  191. Data "What's a ghost's favorite dessert? I-Scream!"
  192. Data "Where do ghosts buy their food? At the ghost-ery store!"
  193. Data "How do you know when a ghost is sad? He starts boo hooing."
  194. Data "Why don't mummies take time off? They're afraid to unwind."
  195. Data "Why did the headless horseman go into business? He wanted to get ahead in life."
  196. Data "What kind of music do mummies like listening to on Halloween? Wrap music."
  197. Data "Why don't mummies have friends? Because they're too wrapped up in themselves."
  198. Data "Why did the vampire read the newspaper? He heard it had great circulation."
  199. Data "How do vampires get around on Halloween? On blood vessels."
  200. Data "What's it like to be kissed by a vampire? It's a pain in the neck."
  201. Data "What's it called when a vampire has trouble with his house? A grave problem."
  202. Data "How can you tell when a vampire has been in a bakery? All the jelly has been sucked out of the jelly doughnuts."
  203. Data "What do you get when you cross a vampire and a snowman? Frostbite."
  204. Data "Why do skeletons have low self-esteem? They have no body to love."
  205. Data "Know why skeletons are so calm? Because nothing gets under their skin."
  206. Data "What do you call a cleaning skeleton? The grim sweeper."
  207. Data "What do skeletons order at a restaurant? Spare ribs."
  208. Data "What do you call a witch's garage? A broom closet."
  209. Data "What kind of food would you find on a haunted beach? A sand-witch!"
  210. Data "What was the witch's favorite subject in school? Spelling."
  211. Data "What do you call two witches who live together? Broom-mates!"
  212. Data "What's a witch's favorite makeup? Ma-scare-a."
  213. Data "Who helps the little pumpkins cross the road safely? The crossing gourd."
  214. Data "What treat do eye doctors give out on Halloween? Candy corneas."
  215. Data "What type of plants do well on all Hallow's Eve? Bam-BOO!"
  216. Data "What do birds say on Halloween? Trick or tweet!"
  217. Data "Why don't skeletons ever go trick or treating? Because they have no-body to go with."
  218. Data "Where do ghosts buy their Halloween candy? At the ghost-ery store!"
  219. Data "What do owls say when they go trick or treating? 'Happy Owl-ween!'"
  220. Data "What do ghosts give out to trick or treaters? Booberries!"
  221. Data "Who did Frankenstein go trick or treating with? His ghoul friend."
  222. Data "What Halloween candy is never on time for the party? Choco-LATE!"
  223. Data "What do witches put on to go trick or treating? Mas-scare-a."
  224. Data "What does Bigfoot say when he asks for candy?  'Trick-or-feet!'"
  225. Data "Which type of pants do ghosts wear to trick or treat? Boo jeans."
  226. Data "What makes trick or treating with twin witches so challenging? You never know which witch is which!"
  227. Data "What happens when a vampire goes in the snow? Frost bite!"
  228. Data "What do you call two witches living together? Broommates"
  229. Data "What position does a ghost play in hockey? Ghoulie."
  230. Data "What do mummies listen to on Halloween? Wrap music."
  231. Data "How do you make a skeleton laugh? You tickle his funny bone!"
  232. Data "Which Halloween monster is good at math? Count Dracula!"
  233. Data "Why did the Cyclops give up teaching? He only had one pupil!"
  234. Data "Why didn't the skeleton go to see a scary movie? He didn't have the guts."
  235. Data "What did the boy ghost say to the girl ghost? 'You sure are boo-tiful!'"
  236. Data "Where does Dracula keep his money? In a blood bank."
  237. Data "Why are ghosts terrible liars? You can see right through them!"
  238. Data "Why don't mummies take vacations? They're afraid to unwind."
  239. Data "What is a vampire's favorite holiday, besides Halloween? Fangs-giving!"
  240. Data "Where do fashionable ghosts shop? Bootiques!"
  241. Data "What's a monster's favorite play? Romeo and Ghouliet!"
  242. Data "What room does a ghost not need? A living room."
  243. Data "What monster plays tricks on Halloween? Prank-enstein!"
  244. Data "What's a ghost's favorite dessert? I scream."
  245. Data "What does the skeleton chef say when he serves you a meal? 'Bone Appetit!'"
  246. Data "What is a vampire's favorite fruit? A neck-tarine!"
  247. Data "What do witches put on their bagels? Scream cheese."
  248. Data "What do ghosts eat for dinner? Spook-ghetti!"
  249. Data "What do skeletons order at restaurants? Spare ribs."
  250. Data "What does a panda ghost eat? Bam-BOO!"
  251. Data "What tops off a mummy's ice cream sundae? Whipped scream."
  252. Data "What's a ghost's favorite yogurt flavor? Boo-berry!"
  253. Data "What's a vampire's least favorite meal? A steak!"
  254. Data "Why was the candy corn booed off the stage? All of his jokes were too corny!"
  255. Data "What happened to the cannibal who showed up late to Halloween dinner? They gave him the cold shoulder."
  256. Data "What happens if you combine a vampire and a snowman? You get frostbite."
  257. Data "Do zombies eat popcorn with their fingers? No, they like to eat the fingers separately."
  258. Data "What happened to the man who got behind on payments to his exorcist? He got repossessed."
  259. Data "Where do most ghouls and goblins live in 2019? In North and South Scarolina."
  260. Data "Why did the team of witches lose the softball game? Their bats kept flying away."
  261. Data "What do you call six witches in a jacuzzi? A self cleaning coven."
  262. Data "Why was the vampire in a bad mood? Too much B negative."
  263. Data "What did the parent say to the baby ghost? Don't spook until your spoken too."
  264. Data "What is a vampire's favorite flavor of ice cream? Veinilla."
  265. Data "What are two freshly married spiders called? Newly-webbed."
  266. Data "Why hasn't anyone ever seen ghost poop? Because it's invisible."
  267. Data "You know it's bad luck to be followed by a black cat… if you are a mouse."
  268. Data "Where do most most werewolves live in 2019? Howlywood California."
  269. Data "Why don't witches have babies? Their husbands have crystal balls."
  270. Data "Why can't the ghost have any children? He has a Halloweenie."
  271. Data "EOD"
  272.  
  273. Sub Update ' preserve from ravages of graphics effects ;-))
  274.     Dim As Integer i, spaces
  275.     Dim w$, c$, a$, h$, pc$
  276.     Color Yellow, Back
  277.     Locate 17, (120 - Len(Answer$)) / 2: Print Coded$;
  278.     Color White, Back
  279.     Locate 18, (120 - Len(Answer$)) / 2
  280.     For i = 1 To Len(Answer$)
  281.         w$ = Mid$(Working$, i, 1): c$ = Mid$(Coded$, i, 1)
  282.         a$ = Mid$(Answer$, i, 1): h$ = Letters$(HighLited)
  283.         If w$ = "*" Then
  284.             pc$ = "*": If h$ = c$ Then Color White, Green Else Color White, Back
  285.         Else
  286.             Color White, Back
  287.             If w$ = UCase$(a$) Then pc$ = a$ Else pc$ = w$
  288.         End If
  289.         Print pc$;
  290.     Next
  291.     spaces = 9
  292.     For i = 1 To 26 'blue background highlighter
  293.         If i = HighLited Then
  294.             Color Yellow, Green
  295.         Else
  296.             Color Yellow, Back
  297.         End If
  298.         Locate 21, spaces: Print Letters$(i);
  299.         If i = HighLited Then
  300.             Color Yellow, Green
  301.         Else
  302.             Color White, Back
  303.         End If
  304.         Locate 22, spaces: Print Guesses$(i);
  305.         spaces = spaces + 4
  306.     Next
  307.     If Mode = 1 Then
  308.         Color White, Back
  309.         CP 24, "  Guess Solve Letter or Menu # "
  310.     ElseIf Mode = 0 Then
  311.         Color Yellow, Back
  312.         CP 24, "  Select Code Letter or Menu # "
  313.     ElseIf Mode = 3 Then
  314.         Color White, Back
  315.         CP 24, "     Select Letter to Find     "
  316.     End If
  317.  
  318. Sub DisplayInstructions
  319.     Dim c As Integer
  320.     Color Orange, Back
  321.     CP 4, "*** Halloween Challenge - Crypt-O-Gram Puzzle ***"
  322.     'Color Red
  323.     CPRC 7, "Solve puzzle by selecting a Code letter then selecting a Guess letter for it."
  324.     CPRC 8, "All selections are made by pressing the spacebar until you are on your choice."
  325.     CPRC 9, "Use the escape key to quit immediately."
  326.     'Color 2
  327.     c = 34
  328.     LPRC 11, c, "Select 1 to get the answer and move onto next puzzle."
  329.     LPRC 12, c, "Select 2 to decode current highlighted letter."
  330.     LPRC 13, c, "Select 3 to solve a letter, then select letter to find."
  331.     LPRC 14, c, "Select 4 to clear a guess at highlighted Code letter."
  332.  
  333.  
  334. Sub CP (row, s$) ' center text on text screen
  335.     Locate row, (_Width - Len(s$)) / 2: Print s$;
  336.  
  337. Sub CPRC (row, s$) ' center text on text screen and print in random colors
  338.     Dim As Integer i, col
  339.     col = (_Width - Len(s$)) / 2
  340.     For i = 1 To Len(s$)
  341.         Color rColor, Back
  342.         Locate row, col + i - 1: Print Mid$(s$, i, 1);
  343.     Next
  344.  
  345. Sub LP (row, col, s$) ' Locate and Print
  346.     Locate row, col: Print s$;
  347.  
  348. Sub LPRC (row, col, s$) ' Locate and print with Random colors
  349.     Dim i As Integer
  350.     For i = 1 To Len(s$)
  351.         Color rColor, Back
  352.         Locate row, col + i - 1: Print Mid$(s$, i, 1);
  353.     Next
  354.  
  355. Function Choice$ (row, col, selection$)
  356.     Dim As _Unsigned Long fg, bg
  357.     Dim As Integer saveRow, saveCol, i
  358.     Dim k&
  359.     fg~& = _DefaultColor: bg~& = _BackgroundColor
  360.     saveRow = CsrLin: saveCol = Pos(0)
  361.     If _KeyDown(27) Then System ' emergency exit
  362.     GoSub show:
  363.     k& = _KeyHit
  364.     If k& = 32 Then KeyTimer = Timer: Place = (Place + 1) Mod Len(selection$)
  365.     If Timer - KeyTimer >= 3 Then Choice$ = Mid$(selection$, Place + 1, 1): Place = 0
  366.     Locate saveRow, saveCol: Exit Function
  367.  
  368.     show:
  369.     Locate row, col
  370.     For i = 1 To Len(selection$)
  371.         If i = Place + 1 Then Color bg~&, fg~& Else Color fg~&, bg~&
  372.         Locate row, col - 1 + i: Print Mid$(selection$, i, 1);
  373.     Next
  374.     '_Display will take place in loop that called Choice$
  375.     Color fg~&, bg~&
  376.     Return
  377.  
  378. Function rColor%
  379.     Dim rc
  380.     rc = Rnd
  381.     If rc > .66 Then
  382.         rColor% = 4
  383.     ElseIf rc > .33 Then
  384.         rColor% = 13
  385.     ElseIf rc > .16 Then
  386.         rColor% = 2
  387.     ElseIf rc > .08 Then
  388.         rColor% = 6
  389.     Else
  390.         rColor% = 12
  391.     End If
  392.  
  393. Sub Splash (n As Integer)
  394.     Dim As Integer i, first, last, nlines, startRow
  395.     Dim s$
  396.     Color 12, Back: Cls
  397.  
  398.     If n = 0 Then
  399.         Open "ASCII by snd.txt" For Input As #1
  400.         For i = 1 To 20
  401.             Line Input #1, s$
  402.             LP i + 5, 41, RTrim$(s$)
  403.         Next
  404.         Close #1
  405.     ElseIf n > 0 Then
  406.         Open "10 Halloweens.txt" For Input As #1
  407.         If n = 1 Then
  408.             first = 11: last = 32: GoSub getText
  409.         ElseIf n = 2 Then
  410.             first = 32: last = 46: GoSub getText
  411.         ElseIf n = 3 Then
  412.             first = 46: last = 57: GoSub getText
  413.         ElseIf n = 4 Then
  414.             first = 57: last = 75: GoSub getText
  415.         ElseIf n = 5 Then
  416.             first = 75: last = 100: GoSub getText
  417.         ElseIf n = 6 Then
  418.             first = 100: last = 111: GoSub getText
  419.         ElseIf n = 7 Then
  420.             first = 111: last = 130: GoSub getText
  421.         ElseIf n = 8 Then
  422.             first = 131: last = 159: GoSub getText
  423.         ElseIf n = 9 Then
  424.             first = 159: last = 180: GoSub getText
  425.         ElseIf n = 10 Then
  426.             first = 180: last = 193: GoSub getText
  427.         End If
  428.     End If
  429.     CP 29, "... Spacebar Only! ..."
  430.     _Display
  431.     _KeyClear
  432.     While _KeyHit <> 32: Wend
  433.     Exit Sub
  434.  
  435.     getText:
  436.     nlines = last - first
  437.     startRow = Int((30 - nlines) / 2)
  438.     For i = 1 To 193
  439.         Line Input #1, s$
  440.         If i >= first And i <= last Then LP i - first + startRow + 1, 25, RTrim$(s$)
  441.         If i > last Then Exit For
  442.     Next
  443.     Close #1
  444.     Return
  445.  
  446. Sub LoadWitches
  447.     Dim w, i, s$
  448.     For w = 1 To 2
  449.         If w = 1 Then Open "witchE.txt" For Input As #1 Else Open "witchW.txt" For Input As #1
  450.         For i = 1 To 7
  451.             Line Input #1, s$
  452.             If w = 1 Then WitchE(i) = s$ Else WitchW(i) = s$
  453.         Next
  454.         Close #1
  455.     Next
  456.  
  457. Sub DrawWitch (WhichWitch$, row, col) ' 7 lines 12 cols  set color
  458.     Dim r, c
  459.     Color 5, Back
  460.     For r = 1 To 7
  461.         If row + r - 1 > 0 And row + r - 1 <= _Height Then
  462.             For c = 1 To 12
  463.                 If col + c - 1 > 0 And col + c - 1 <= _Width Then
  464.                     If UCase$(WhichWitch$) = "E" Then
  465.                         If Mid$(WitchE(r), c, 1) <> " " Then LP row + r - 1, col + c - 1, Mid$(WitchE(r), c, 1)
  466.                     Else
  467.                         Color 7
  468.                         If Mid$(WitchW(r), c, 1) <> " " Then LP row + r - 1, col + c - 1, Mid$(WitchW(r), c, 1)
  469.                     End If
  470.                 End If
  471.             Next
  472.         End If
  473.     Next
  474.  
  475. Sub DrawPumpkin (row, col) ' mid pumkin
  476.     Dim p$, r, c
  477.     Color 12, Back
  478.     p$ = "((|))"
  479.     For r = -1 To 0
  480.         If row + r > 0 And row + r <= _Height Then
  481.             For c = -2 To 2
  482.                 If col + c > 0 And col + c <= _Width Then
  483.                     If r = -1 And c = 0 Then
  484.                         LP row + r, col, ","
  485.                     ElseIf r = 0 Then
  486.                         LP row + r, col + c, Mid$(p$, c + 3, 1)
  487.                     End If
  488.                 End If
  489.             Next
  490.         End If
  491.     Next
  492.  

 
One Key Screen 0 Halloween Crypt-O-Gram.PNG
* One Key Screen 0 Halloween Crypt-O-Gram.zip (Filesize: 7.77 MB, Downloads: 163)

Offline Pete

  • Forum Resident
  • Posts: 2361
  • Cuz I sez so, varmint!
    • View Profile
Re: One Key Screen 0 Halloween Crypt-O-Gram
« Reply #1 on: October 21, 2021, 03:14:50 pm »
Yeah, it's nice, but who the hell wants to be stuck in SCREEN 0? Oops, forget I said that. It was my evil twin, Steve.

Anonymous
Want to learn how to write code on cave walls? https://www.tapatalk.com/groups/qbasic/qbasic-f1/