A command-line trivia game where you pick the lie hidden among two true facts about an NFL player. Enter any player's full name from the built-in roster, and the game uses the Groq LLM API (llama-3.3-70b-versatile) to generate two verifiable career facts and one plausible-but-false statement, shuffled in random order. You guess which one is the lie, get told if you're right, and can keep playing as long as you like.
-
Clone the repo and enter the project folder:
git clone <repo-url> cd nfl-truths-lies -
Install dependencies:
pip install -r requirements.txt -
Copy the example env file and add your key:
cp .env.example .envThen open
.envand replaceyour_key_herewith your free API key from console.groq.com.
python main.py
Type quit at the player name prompt to exit, or 0 at the play-again prompt.
2 Truths and a Lie: NFL Edition
================================
Enter an NFL player's full name to get started.
Type 'quit' at the player prompt to exit.
Enter a player name: Patrick Mahomes
Generating statements for Patrick Mahomes...
Which of these is the lie?
1. Patrick Mahomes was selected 10th overall in the 2017 NFL Draft by the Kansas City Chiefs.
2. Patrick Mahomes played college football at Texas Tech University.
3. Patrick Mahomes won the NFL MVP award in his first full season as a starter in 2018.
Which is the lie? (1/2/3): 1
Correct! The lie was: Patrick Mahomes was selected 10th overall in the 2017 NFL Draft by the Kansas City Chiefs.
Enter 1 to play again, 0 to quit: 0
Thanks for playing!
(Mahomes was actually the 10th pick — but the lie in a real round would be something fabricated. The LLM generates fresh statements each game.)