Yahtzee Game

A Yahtzee game developed in Java and playable on the command line

Yahtzee Game cover

Key learnings

Java fundamentals including object-oriented programming and data structure implementation

Game logic design with systematic scoring algorithms and state management

Command-line interface development with input validation and user experience optimization

Description

This is a command-line implementation of the classic dice game Yahtzee, built in Java. Players roll five dice up to three times per turn, trying to achieve specific combinations like straights, full houses, or five-of-a-kind. The game supports multiple players and automatically calculates scores based on the standard Yahtzee scoring system.

The interface runs entirely in the terminal, with clear prompts guiding players through each turn. Players can choose which dice to keep and which to reroll, and the game handles all score calculations and game state management automatically.

Reflection

This project was an excellent way to apply the Java fundamentals I had been learning. It gave me practical experience with object-oriented programming principles, particularly in organizing game logic into logical classes and managing game state effectively.

Working on Yahtzee helped me practice with different data structures, arrays for managing dice, lists for tracking scores, and maps for organizing player information. I also learned about input validation and creating a user-friendly command-line interface.

The project taught me about breaking down complex problems into manageable pieces. Implementing the various Yahtzee combinations required careful logical thinking and systematic testing to ensure the scoring worked correctly in all cases.

Last updated: Sep 21, 2026