Skip to content

SergioPinilla04/Ahorcado_web

Repository files navigation

Hangman Game... Now available in your browser!

This is a continuation of my previous project https://github.com/SergioPinilla04/Ahorcado. I highly recommend taking a glance at it before diving into this web version of the program.

In order to transform the Hangman game we already have into a web interface, we will use the module CGI for Python.

Contents

  1. Preparation
  2. The Game
  3. Contributions
  4. License

Preparation

First of all, we need to configure our web server to "read" CGI interfaces. In my case it will be Apache, but in any case, we need to edit the configuration file located in Apache24>conf>httpd.conf (on Windows).

image

Tip

I left my configuration file on this repository in the case you have any problem.

image

image

image

Important

Make sure to restart Apache after doing any changes on its configuration file!

Now we can add the Python files of the Hangman game into the folder Apache24/cgi-bin:

image

Note

The database is the same as the one of the previous version of the game.

The Game

Sign-up and sing-in

To access the game, we need to search localhost/cgi-bin-index.py in our favourite browser. Here we will access the sign-in page:

image

But first, we need to register ourselves into the data base trhough the link "Regístrate".

image

image

The user has been added to our database:

image

Now we can sign-in into our game with this new user and access the main manu:

image

Parts of the Main Menu

  1. If we access the "cuenta" link, we will be able to modify or even delet our account:

image

Warning

On this version of the game, the change of the password and the delete of the account are nor working properly.

  1. On the "Palabras del Ahorcado" link, we will access another menu, where will be able to choose between:

image

  • Añadir una palabra al Ahorcado: where we will be able to add a word into the game:

image

image

This new word has been added into our database:

image

  • Palabras del Ahorcado: where we can see the words that have been added into the database:

image

  • Borrar una palabra del Ahorcado: you will be able to delete any word.

image

image

The word has been deleted fon the database:

image

  1. Back on the main menu, the "Jugar" link takes us to the game, where a random word of the database is selected and we will try and guess word by word:

image

image

The database will register the details of the attempts:

image

Warning

In this version, the game is not working properly yet.

Contributions

Feel free to contribute to the development of the game. You can open issues to report bugs or suggest new features.

License

This work is licensed under CC BY-NC-SA 4.0. To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-sa/4.0/

About

Hangman game but now as a web app

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages