wenyuema-cs / BowlingGame

Fun Bowling Game

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bowling Game Scoreboard

This project simulates a ten-pin bowling game according to traditional scoring rules. It's written in C# and demonstrates object-oriented programming principles, exception handling, and unit testing with NUnit.

Features

  • Simulate rolling in a ten-pin bowling game.
  • Provide two gaming ways: (1) strike one after one; (2) handling for the 10th frame all at once.
  • Console output as scoreboard for each roll's result (strike, spare, open frame) and current score.
  • Support for perfect games and gutter games with special end messages.
  • Unit tests covering various game scenarios.

UML Class Diagram

Getting Started

Prerequisites

  • .NET 8.0 SDK or later
  • NUnit 3.13.3
  • NUnit.Analyzer 3.6.1
  • NUnit3TestAdapter 4.2.1 for unit testing

Installation

  • Clone the repository to your local:
    git clone https://github.com/wenyuema-cs/BowlingGame.git

Implement

  • Build the project and run the bowling game:
dotnet build
dotnet run --project BowlingGame
  • Output supposed as

Unit Test

Catalog

Terminal

  • Perfect game as an example:
dotnet test

About

Fun Bowling Game


Languages

Language:C# 95.9%Language:Dockerfile 4.1%