HangmanSolver is an asynchronous solver for hangman. It's very simple to use and is pretty fast.
Project description
HangmanSolver
Async-Friendly Hangman solver.
Source - https://github.com/TheOnlyWayUp/hangmanSolver
Wiki - https://github.com/TheOnlyWayUp/hangmanSolver/wiki
import hangman, asyncio
h = hangman.HangmanSolver()
solve = asyncio.run(h.solve("Ca_e"))
print(f"{solve.len} possible answers for {solve.query}.\n{solve.words}.\n\nDir - {dir(solve)}")
Output -
22 possible answers for Ca_e.
['Cade', 'Cade', 'Cafe', 'Cafe', 'Cage', 'Cage', 'Cake', 'Cake', 'Came', 'Came', 'Cane', 'Cane', 'Cape', 'Cape', 'Care', 'Care', 'Case', 'Case', 'Cate', 'Cate', 'Cave', 'Cave'].
Dir - ['__annotations__', '__class__', '__delattr__', '__dict__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__gt__', '__hash__', '__init__', '__init_subclass__', '__le__', '__lt__', '__module__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '__weakref__', 'len', 'query', 'words']
import hangman, asyncio
h = hangman.HangmanSolver(interactive=True)
solve = asyncio.run(h.solve())
print(f"{solve.len} possible answers for {solve.query}.\n{solve.words}.\n\nDir - {dir(solve)}")
Output -
> Enter all known values as letters, and unknown values as _s.
> Example - If the word to guess is 'Cake', and only the letter 'e' is given, you should enter '___e'.
Ca_e
22 possible answers for Ca_e.
['Cade', 'Cade', 'Cafe', 'Cafe', 'Cage', 'Cage', 'Cake', 'Cake', 'Came', 'Came', 'Cane', 'Cane', 'Cape', 'Cape', 'Care', 'Care', 'Case', 'Case', 'Cate', 'Cate', 'Cave', 'Cave'].
Dir - ['__annotations__', '__class__', '__delattr__', '__dict__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__gt__', '__hash__', '__init__', '__init_subclass__', '__le__', '__lt__', '__module__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '__weakref__', 'len', 'query', 'words']
Created by TheOnlyWayUp#1231 - https://github.com/TheOnlyWayUp/
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
HangmanSolver-0.0.2.tar.gz
(2.9 kB
view details)
File details
Details for the file HangmanSolver-0.0.2.tar.gz
.
File metadata
- Download URL: HangmanSolver-0.0.2.tar.gz
- Upload date:
- Size: 2.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.0 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b33d3032cbaee5b572888723ff1bcfce11fe7444e9b713719e2e19da465201a1 |
|
MD5 | 692eee978ce0ff8d7a445f579295a299 |
|
BLAKE2b-256 | 300d731fa5da734867e02621cfda8e13f18c267c93da7dd4c473d26777639d71 |