08-30-2022, 09:07 PM
Yeah I dumped all the duplicate words and words I didn't recognize, now 440, in a 50 LOC Mouse only Hangman Game.
Code: (Select All)
_Title "b+ 5 Letter Hangman" 'b+ 2022-08-30 work from modified 5 letter word list from Ken
Randomize Timer ' <<< once up here is all that is needed
_FullScreen
DefLng A-Z
w$ = "abuseadultagentangerappleawardbasisbeachbirthblockbloodboardbrainbreadbreakbrownbuyercausechainchairchestchiefchildchinaclaimclassclockcoachcoastcourtcovercreamcrimecrosscrowdcrowncycledancedeathdepthdoubtdraftdramadreamdressdrinkdriveearthenemyentryerroreventfaithfaultfieldfightfinalfloorfocusforceframefrankfrontfruitglassgrantgrassgreengroupguidehearthorsehotelhouseimageindexinputissuejapanjudgeknifelayerlevellightlimitlunchmajormarchmatchmetalmodelmoneymonthmotormouthmusicnightnoisenorthnovelnurseofferorderotherownerpanelpaperpartypeacephasephonepiecepilotpitchplaceplaneplantplatepointpoundpowerpresspriceprideprizeproofqueenradiorangeratioreplyrightriverroundrouterugbyscalescenescopescoresenseshapesharesheepsheetshiftshirtshocksightskillsleepsmilesmithsmokesoundsouthspacespeedspitesportsquadstaffstagestartstatesteamsteelstockstonestorestudystuffstylesugartabletastethemethingtitletotaltouchtowertracktradetraintrendtrialtrusttruthuncleunionunityvaluevideovisitvoicewastewatchwaterwhilewhitewholewomanworldyouththerewherewhichwhoseyoursadmitadoptagreeallowalterapplyargueariseavoidbeginblamebringbuildburstcarrycatchcheckcleanclearclimbclosecountenjoyenterexistguessimplylaughlearnleavemarryoccurproveraisereachreferrelaxserveshallshootsolvespeakspendsplitstandstickteachthankthinkthrowtreatworrywouldwriteaboveacutealivealoneangryawareawfulbasicblackblindbravebriefbroadcheapcivilcrazydailydirtyearlyemptyequalexactextrafaintfalsefifthfirstfreshfunnygiantgrandgreatgrosshappyharshheavyhumanidealinnerjointlargelegallocallooseluckymagicminormoralnakednastynavalouterplainprimepriorproudquickquietrapidreadyroughroyalruralsharpsheershortsillysixthsmallsmartsolidsorrysparesteepstillsupersweetthickthirdtighttoughupperupseturbanusualvaguevalidvitalwrongyoungaftersinceslashuntilaboutaccelafoulagainagapeaheadalikealoftalongaloofaloudamissamplyamuckapaceapartaptlyarearasideaskewbadlybelowcannycoylydimlydittodrylydullyforteforthfullygaylygodlyhencehotlyicilyjollylowlymadlymaybenevernewlynoblyoddlyoftenoughtpianoplumbqueerquitesadlyshylysleekslylystarktallytodaytrulytwiceunderutterwanlywetlyamongcircaminusadieuadiosalohablessbravofudgegollyhavochellohowdymercypsychsalvesniffwackowoops"
While _KeyDown(27) = 0
word$ = Mid$(w$, 5 * (Int(Rnd * 440)) + 1, 5)
Show$ = "*****"
Hanged$ = ""
L$ = "abcdefghijklmnopqrstuvwxyz"
missed = 0
Cls
Print L$, Show$, Hanged$
While _KeyDown(27) = 0
While _MouseInput: Wend
If _MouseButton(1) Then ' no game until a click
_Delay .2
mx = _MouseX
guess$ = Mid$(L$, mx, 1)
If guess$ <> " " And guess$ <> "" Then
Mid$(L$, mx, 1) = " " ' use letter
hit = 0
For i = 1 To 5
If Mid$(word$, i, 1) = guess$ Then
hit = 1
Mid$(Show$, i, 1) = guess$
End If
Next
If hit = 0 Then
missed = missed + 1
Hanged$ = Mid$("HANGED!", 1, missed)
End If
End If
Cls
Print L$, Show$, Hanged$
Print
If Show$ = word$ Then
Print "Congrats! you got it!, zzz... "
ElseIf Hanged$ = "HANGED!" Then
Print "So sorry you're hanged, the word was "; word$; ", zzz... "
End If
If Show$ = word$ Or Hanged$ = "HANGED!" Then
Sleep
Exit While
End If
_Limit 60
End If
Wend
Wend
b = b + ...