Skip to content

Two-Player Yahtzee game implemented in C. Human player competes against a computer using an optimal strategy. Includes all standard Yahtzee scoring categories, 13 rounds of gameplay, and clear prompts for user interaction.

Notifications You must be signed in to change notification settings

IT24103479/Two-Player-Yahtzee-C

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Two-Player Yahtzee Game in C

Overview

This is a simplified two-player version of the classic dice game Yahtzee implemented in C.
The human player competes against the computer, which uses an optimal strategy to maximize its score. The game consists of 13 rounds with five dice rolls per round.

Features

  • Full implementation of Yahtzee scoring categories:
    • Ones, Twos, Threes, Fours, Fives, Sixes
    • Three of a Kind, Four of a Kind
    • Full House
    • Small Straight, Large Straight
    • Yahtzee, Chance
  • Human player input with clear prompts
  • Computer AI chooses optimal dice and scoring categories
  • Tracks scores over 13 rounds and determines the winner

How to Run

  1. Compile the program:
    gcc src/yahtzee.c -o yahtzee
  2. Run the executable:
    ./yahtzee
  3. Follow the prompts to play against the computer.

About

Two-Player Yahtzee game implemented in C. Human player competes against a computer using an optimal strategy. Includes all standard Yahtzee scoring categories, 13 rounds of gameplay, and clear prompts for user interaction.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages