A classroom game designed for interactive play, inspired by Family Feud. The game features a student-facing "Board" view and a teacher-facing "Host" view to manage the state of the game, reveal answers, and award points.
- Python 3.7 or higher
- pip (Python package installer)
-
Clone or Download the Repository: Ensure you have all the files in your local directory.
-
Create a Virtual Environment (Recommended):
python3 -m venv venv source venv/bin/activate # On macOS/Linux venv\Scripts\activate # On Windows
-
Install Dependencies: Install the required Python packages using
pip.pip install -r requirements.txt
-
Prepare Game Data: Make sure you have a
game_data.jsonfile in the root directory of the project (the same folder asapp.py). See next section on how to create it. -
Start the Server:
python app.py
The server will start on port
5001. See next subsection for hyperlink. -
Open the Game Views:
- Game Board (Students' View): Open a web browser and navigate to http://localhost:5001/. Project this screen for the class to see.
- Host Panel (Teacher's View): Open another tab or device and navigate to http://localhost:5001/host. Use this panel to control the game.
The game relies on a game_data.json file to load questions, answers, and points. The file consists of two main sections: classic rounds (multiple answers) and lightning rounds (a single correct answer).
Here is an example of the structure:
{
"classic": [
{
"label": "Round 1: Animals",
"question": "Name an animal you might find at the zoo.",
"answers": [
{ "text": "Lion", "points": 40 },
{ "text": "Elephant", "points": 30 },
{ "text": "Monkey", "points": 20 },
{ "text": "Giraffe", "points": 10 }
]
},
{
"label": "Round 2: Colors",
"question": "Name a primary color.",
"answers": [
{ "text": "Red", "points": 50 },
{ "text": "Blue", "points": 30 },
{ "text": "Yellow", "points": 20 }
]
}
],
"lightning": [
{
"label": "Lightning Round 1",
"question": "What is the capital of France?",
"answer": "Paris",
"points": 100
},
{
"label": "Lightning Round 2",
"question": "What is 5 + 7?",
"answer": "12",
"points": 50
}
]
}-
classicArray: Contains the standard rounds (multiple answers).label: The name of the round shown in the host's drop-down menu.question: The main prompt/question for the round.answers: A list of objects, each containing:text: The answer string to be revealed on the board.points: The numeric point value awarded for guessing the answer.
-
lightningArray: Contains lightning rounds (typically with just one correct answer).label: The name of the round shown in the host's drop-down menu.question: The prompt for the lightning round.answer: The correct answer string.points: The numeric point value awarded for getting the answer right.