Object-Oriented console version of the classic Hangman game. The user is handled a word and has 'N' number of attempts to guess the word.
-
postgresql installed and configured
-
postgresql table with the following credentials:
( id integer NOT NULL GENERATED ALWAYS AS IDENTITY ( INCREMENT 1 START 1 MINVALUE 1 MAXVALUE 742 CACHE 1 ), word character varying(64) COLLATE pg_catalog."default", CONSTRAINT words_pkey PRIMARY KEY (id) ) TABLESPACE pg_default; ALTER TABLE IF EXISTS public.words OWNER to postgres;
-
psycopg installed
pip install psycopg2
- Clone the repository
git clone https://github.com/BorisDundakov/Hangman.git
- Start the game!
/bin/python main.py
- Implementation of OOP principles
- Visual features and game rules depending on difficulty selected (displaying the word and the hanging man)
- Hard difficulty implements a timer
- Random word is selected from a PostgreSQL Database
- Database source - https://github.com/Xethron/Hangman/blob/master/words.txt
- Previous version of the project was set up with a .txt file as a database