GameZone is an interactive, terminal-based gaming platform developed as the final project for Harvard's CS50x Introduction to Programming with Python (CS50P). It unifies three classic games under a single interface featuring robust user authentication and persistent statistical tracking.
While the games themselves are classic, the engineering challenge lay in creating a cohesive system that handles user data securely, manages program flow across different modules, and implements complex game logic—most notably, an unbeatable AI for Tic-Tac-Toe using the Minimax algorithm.
▶ Tic-Tac-Toe AI with Minimax Algorithm A highlight of the project is the "Bone Cracking" difficulty level in Tic-Tac-Toe. I implemented the Minimax recursive algorithm to calculate the optimal move for the CPU state. This ensures that the AI plays perfectly and cannot be beaten by the human player. Two easier difficulties (Random and Defensive/Offensive logic) were also included for casual play.
▶ Robust User Authentication System The platform features secure sign-up and login flows. I utilized complex regex patterns to validate email formats and ensures user names contain only alphanumeric characters, preventing malformed data from entering the system. It also includes a "Guest Mode" for quick play without data saving.
▶ Comprehensive Statistics Engine The system tracks detailed metrics for every user, including wins, losses, draws, and win-rate percentages, both per-game and overall. The data is aggregated from the CSV backend and presented to the user in a clean, readable dashboard using the prettytable library.
▶ Hangman & Little Professor Logic Hangman features a database of 1000+ words and specific logic to hide exactly three positions per word to standardize difficulty. Little Professor serves as an educational tool featuring dynamic arithmetic question generation and immediate feedback loops.