Farkle is a popular dice game where players take turns rolling six dice to score points. The objective is to be the first player to reach 10,000 points. This Python-based version of Farkle features a graphical user interface (GUI) created with the Tkinter library. The game allows multiple human and AI players to compete.
- GUI-based gameplay using Tkinter
- Supports multiple human and AI players
- Dynamic status updates and score tracking
- Handles scoring combinations and game logic
- End-of-game winner announcement
- Python 3.x
tkinter
library (usually included with Python)
- Ensure you have Python 3.x installed on your system.
- Clone this repository or download the game script.
- Navigate to the directory where the script is located.
- Open your terminal or command prompt.
- Run the script using Python:
python farkle.py
- Follow the on-screen prompts to start the game.
- When the game starts, you will be prompted to enter the number of human players and AI players.
- Enter the names for human players.
- Each player takes turns rolling six dice.
- After rolling, the player can choose scoring combinations from the list.
- Points are awarded based on the chosen combinations.
- The player can continue rolling the remaining dice or end their turn to bank the current score.
- If a player rolls and cannot make any scoring combinations, they "Farkle" and lose the points accumulated in that turn.
111
= 1000 points666
= 600 points555
= 500 points444
= 400 points333
= 300 points222
= 200 points1
= 100 points5
= 50 points
- Click "End Turn" to bank your current score and pass the turn to the next player.
- The game proceeds until a player reaches the target score of 10,000 points.
- The last round starts when a player reaches or exceeds 10,000 points.
- The game ends when all players have completed the last round.
- The player with the highest score at the end of the game is declared the winner.
- The game uses the Tkinter library to create the GUI.
- The game logic handles dice rolls, scoring, turn management, and end-of-game conditions.
- The
POINTS
dictionary defines the scoring combinations and their respective points.
- Add more sophisticated AI player logic.
- Improve the user interface for better user experience.
- Add options for customizing game rules and target score.
Enjoy playing Farkle! If you encounter any issues or have suggestions for improvements, feel free to open an issue or submit a pull request. Happy gaming!