Skip to content

This program lets you track the scores for a game between two players. You start by entering the players' names, and then the program keeps track of their scores as you play. The game goes on until one of the players wins by either getting at least 15 points with a 2-point lead or scoring 7 points while the other player has none.

Notifications You must be signed in to change notification settings

qtle3/score_counter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

Game Score Tracker

This program lets you track the scores for a game between two players. You start by entering the players' names, and then the program keeps track of their scores as you play. The game goes on until one of the players wins by either getting at least 15 points with a 2-point lead or scoring 7 points while the other player has none.

Key Features

Player Input

  • The program prompts for the names of the two players.

Score Initialization

  • Both players' scores start at zero.

Game Loop

The program enters a loop where it repeatedly:

  • Displays the current score.
  • Asks for the winner of the next point.
  • Updates the score accordingly.

Winning Conditions

The game ends when one player:

  • Reaches at least 15 points and is ahead by at least 2 points.
  • Achieves a score of 7 while the other player has a score of 0.

Winner Announcement

  • The program announces the winner once the game ends based on the scores.

About

This program lets you track the scores for a game between two players. You start by entering the players' names, and then the program keeps track of their scores as you play. The game goes on until one of the players wins by either getting at least 15 points with a 2-point lead or scoring 7 points while the other player has none.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages