11import random
22import asyncio
33
4- words = ['rainbow' , 'computer' , 'science' , 'programming' ,
5- 'python' , 'mathematics' , 'player' , 'condition' ,
6- 'reverse' , 'water' , 'board' , 'geek' ]
7-
4+ words = ['conversation' , 'bowtie' , 'skateboard' , 'penguin' , 'hospital' , 'player' , 'kangaroo' ,
5+ 'garbage' , 'whisper' , 'achievement' , 'flamingo' , 'calculator' , 'offense' , 'spring' ,
6+ 'performance' , 'sunburn' , 'reverse' , 'round' , 'horse' , 'nightmare' , 'popcorn' ,
7+ 'hockey' , 'exercise' , 'programming' , 'platypus' , 'blading' , 'music' , 'opponent' ,
8+ 'electricity' , 'telephone' , 'scissors' , 'pressure' , 'monkey' , 'coconut' , 'backbone' ,
9+ 'rainbow' , 'frequency' , 'factory' , 'cholesterol' , 'lighthouse' , 'president' , 'palace' ,
10+ 'excellent' , 'telescope' , 'python' , 'government' , 'pineapple' , 'volcano' , 'alcohol' ,
11+ 'mailman' , 'nature' , 'dashboard' , 'science' , 'computer' , 'circus' , 'earthquake' , 'bathroom' ,
12+ 'toast' , 'football' , 'cowboy' , 'mattress' , 'translate' , 'entertainment' , 'glasses' ,
13+ 'download' , 'water' , 'violence' , 'whistle' , 'alligator' , 'independence' , 'pizza' ,
14+ 'permission' , 'board' , 'pirate' , 'battery' , 'outside' , 'condition' , 'shallow' , 'baseball' ,
15+ 'lightsaber' , 'dentist' , 'pinwheel' , 'snowflake' , 'stomach' , 'reference' , 'password' , 'strength' ,
16+ 'mushroom' , 'student' , 'mathematics' , 'instruction' , 'newspaper' , 'gingerbread' ,
17+ 'emergency' , 'lawnmower' , 'industry' , 'evidence' , 'dominoes' , 'lightbulb' , 'stingray' ,
18+ 'background' , 'atmosphere' , 'treasure' , 'mosquito' , 'popsicle' , 'aircraft' , 'photograph' ,
19+ 'imagination' , 'landscape' , 'digital' , 'pepper' , 'roller' , 'bicycle' , 'toothbrush' , 'newsletter' ]
20+
21+ images = ['```\n +---+\n O | \n /|\\ | \n / \\ | \n ===```' ,
22+ '```\n +---+ \n O | \n /|\\ | \n / | \n ===```' ,
23+ '```\n +---+ \n O | \n /|\\ | \n | \n ===```' ,
24+ '```\n +---+ \n O | \n /| | \n | \n ===```' ,
25+ '```\n +---+ \n O | \n | | \n | \n ===```' ,
26+ '```\n +---+ \n O | \n | \n | \n ===```' ,
27+ '```\n +---+ \n | \n | \n | \n ===```' ]
828async def play (bot , ctx ):
929 def check (m ):
1030 return m .author == ctx .author
1131 guesses = ''
12- turns = 8
32+ turns = 6
1333 word = random .choice (words )
1434 await ctx .send ("Guess the characters:" )
15- guess_msg = await ctx .send (f"Guesses left: ` { turns } `" )
35+ guess_msg = await ctx .send (images [ turns ] )
1636 word_msg = await ctx .send (f"`{ ' ' .join ('_' * len (word ))} `" )
1737 while turns > 0 :
1838 out = ''
@@ -47,6 +67,7 @@ def check(m):
4767 if guess not in word :
4868 turns -= 1
4969 await ctx .send ("Wrong :x:" , delete_after = 1.0 )
50- await guess_msg .edit (content = f"Guesses left: ` { turns } `" )
70+ await guess_msg .edit (content = images [ turns ])
5171 if turns == 0 :
72+ await word_msg .edit (content = f'**{ word } **' )
5273 return await ctx .send ("You Loose :x:" )
0 commit comments