Now that the base game logic is in place, this course introduces user interaction, semantic scoring, and a leaderboard system to bring competition and personalization into the experience. Learners will integrate server logic that connects the frontend with dynamic game behavior.
Overview
Syllabus
- Unit 1: Scoring Word Guesses
- Prepare spaCy Model for Similarity Scoring
- Implement score_guess Function Skeleton
- Convert Text to spaCy Doc Objects for Similarity Scoring
- Normalize Case in score_guess Function
- Implement Word Semantic Similarity Scoring
- Unit 2: Building a Game Leaderboard
- Set Up SQLAlchemy Engine and Session Factory
- Implement HighScore Model and to_dict Method
- Add Leaderboard Function Signatures
- Implement Leaderboard submit_score Function
- Add Database Persistence to Submit Score Function
- Implement get_leaderboard Function
- Unit 3: Connecting Game Features
- Create APIRouter Instance for Game Routes
- Implement the Game Data Route
- Implement /submit_guess Route for Guess Scoring
- Implement Submit Score Endpoint
- Implement Leaderboard Endpoint
- Unit 4: Initializing the Game Application
- FastAPI App Initialization for Word Prediction Game
- Initialize Database Tables in FastAPI Prediction Game
- Organize Application Routes with FastAPI Routers
- Add script-runner guard to FastAPI application