🧠 A memory game integrated with Django to track and save player results in a database.
This project was developed using the following technologies:
$ git clone https://github.com/aristo-ifrn/django-memory-game
$ cd django-memory-game
- Install the dependencies:
$ pip install -r requirements.txt
- Run the migrations to set up the database:
$ python manage.py migrate
- Start the server:
$ python manage.py runserver
Access the application in your browser at http://127.0.0.1:8000/.
Resume: 🧠 A Django-powered memory game application where players' results, including flips, time, and completion status, are saved and displayed in a ranking system.
templates/:
HTML templates for the frontend (index.html, game.html, ranking.html).views.py:
Defines the logic for handling game, ranking, and API endpoints.models.py:
Contains the Player model to store player data in the database.urls.py:
Maps application routes to views.static/:
Contains CSS, JavaScript, and other static assets.
- Play the memory game and track player performance.
- Save game results (username, flips, time, and completion status) to a database.
- View a ranking of players based on game performance.
- Expose API endpoints for fetching and adding player data.
- GET
/get/
Returns a JSON response with all player results, ordered by completion status, flips, and time.
- POST
/add/
Accepts JSON data to create a new player result.
{
"username": "JohnDoe",
"flips_quantity": 15,
"used_time": 120,
"date": "2024-11-22T12:34:56",
"has_completed": true
}
Aristofany Herderson