Welcome to the Morra Game, a Python implementation of the classic game of strategy and chance. This project was developed as part of our Year 1 Software Development coursework by Fiona Odige and Esiyemeh Idogho. The game is designed to showcase our programming skills and teamwork in solving real-world challenges.
The Morra Game is a simple yet engaging two-player game (Player vs. Computer). In each round, both players simultaneously show between 1 and 10 fingers. The winner is determined based on the total number of fingers shown:
- If the total is even, the player who chose "Even" wins.
- If the total is odd, the player who chose "Odd" wins.
The winner of the round earns 2 points, and an additional 1 point is awarded to the player whose number of fingers is closer to the total. The game continues until one player accumulates 6 points, at which point they are declared the winner.
-
Main Menu:
- View the rules of the game.
- Start a new game.
- Check current scores and rounds.
- Exit the game.
-
Scoring System:
- Points are awarded based on game outcomes and proximity to the total fingers.
- Tracks rounds and resets scores after each game.
-
Player Interaction:
- Choose between "Even" or "Odd".
- Input the number of fingers (1-10) to play each round.
The development of this game was a learning experience from start to finish. As a team, Fiona and I began by carefully analyzing the assignment brief and brainstorming how to structure the project. Here's how we approached it:
- Pseudocode: Writing pseudocode helped us outline the game’s logic, such as global variables, menu options, and game outcomes.
- Flowchart: Using Miro, we designed a flowchart to visualize the game's structure and logic. This step was challenging but invaluable for understanding the overall workflow.
Starting with basic functionality, we gradually built the program using:
- Global Variables to track player and computer scores.
- Functions for the menu, gameplay, and rule display.
- Control Structures (loops, conditionals) to manage user input and game logic.
We rigorously tested the game to ensure it worked as intended:
- Menu navigation (rules, play, scores, exit).
- Handling invalid inputs gracefully.
- Correct calculation of scores and winner declaration.