brpandey / fast-hangman Goto Github PK
View Code? Open in Web Editor NEWCommand-line hangman game
Command-line hangman game
Command-line hangman game with strategy built in. NOTE: Needs to broken out better into functional pieces - as the design is a bit monolithic at the moment. The initial strategy was: 1. Guess the most common letter from the list of n-letter words in the dictionary (where n is the length of the hidden word). If more than one letter has the same frequency, guess the most common in dictionary frequency. 2. Filter out non-matching words as letters are guessed. Examples: $ java PlayHangman -f words.txt -baseline $ java PlayHangman -f words.txt wonderful ----E----; score=1; status=KEEP_GUESSING ----E----; score=2; status=KEEP_GUESSING ----E----; score=3; status=KEEP_GUESSING ----E---L; score=4; status=KEEP_GUESSING ----E-F-L; score=5; status=KEEP_GUESSING ----E-FUL; score=6; status=KEEP_GUESSING ---DE-FUL; score=7; status=KEEP_GUESSING W--DE-FUL; score=8; status=KEEP_GUESSING WONDERFUL; score=8; status=GAME_WON Usage: $ java PlayHangman -h Usage: Please enter a hangman word and optionally '-v' if the verbose mode is desired or specify a list of hangman words <Simple> java PlayHangman -h java PlayHangman -f dictionary.txt [-v] $word1 java PlayHangman -f dictionary.txt $word1 ... [$wordN] java PlayHangman -f dictionary.txt -baseline java PlayHangman -f dictionary.txt -batch large.txt <Advanced A> java PlayHangman -f dictionary.txt [(-lt)(-lv)(-v)(-v2)] [-clk2] $word1 (v2 = more verbose output) (v = verbose output) (lv = less verbose output) (lt = less terse output) (clk = high level timing output) <Advanced B> java PlayHangman -f dictionary.txt [[-clk][-clk2]] $word1 ... $wordN (clk2 = lower level timing output) <Initialize stumper finding strategy> (for 175k words takes ~ 45 mins) java PlayHangman -f dictionary.txt -init:stumpers
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.