Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 225383
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T19:24:28+00:00 2026-05-11T19:24:28+00:00

I am programming a simple C# console application. The spec is: A game consists

  • 0

I am programming a simple C# console application.

The spec is:

A game consists of ten frames, which start with a full rack of ten pins. In each frame, you have two deliveries of your ball, in which to knock down as many of the ten pins as you can. If you knock down all the pins on your first ball, it is called a strike. The score doesn’t get added on straight away because for a strike you get the values of your next two balls as a bonus. For example, if you score a strike in the first frame, then a 7 and 1 in the second frame, you would score 18 (10+7+1) for the first frame, and 8 for the second frame, making a total of 26 after two frames. If you knock down some of the pins on the first ball, and knock down the remainder of the pins in the second ball, it is known as a spare. Again, the score doesn’t get added on straight away because for a spare, you get the values of your next ball as a bonus. For example, if you score a spare in the first frame, say a 6 and a 4, then got an 8 and a 1 in the second frame, you would score 18 (6+4+8) for the first frame, and 9 for the second frame, making a total of 27 after two frames.

I understand how to write the code etc. etc.
However, I just cannot get my head around the best way of doing this scoring system and I need some advice.
Obviously a new object will be created for each player, however I am not sure of how to get round what seemed like a simple programming problem initially.

Any help would be greatly appreciated.

Regards

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-11T19:24:29+00:00Added an answer on May 11, 2026 at 7:24 pm

    In bowling, strikes and spares are called “marks.” Use this!

    enum Marks { Open, Spare, Strike };
    

    This way, you can determine what type of mark you have per frame. After a ball is thrown, check the last two frames, and update their scores. Then add up the scores.

    Another note: If you’re showing frame-by-frame scoring, do not show the frame score in a string of strikes (e.g.-four strikes in a row should not result in “30” being shown in frame 1). Wait for a spare or open to display the totals. It’s improper scoring to do anything different, and it bugs the hell out of me when video games don’t recognize that.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 211k
  • Answers 211k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer I guess that what you are looking for is Atlassian… May 12, 2026 at 10:09 pm
  • Editorial Team
    Editorial Team added an answer Maybe try some work on a reasonable sized Open Source… May 12, 2026 at 10:08 pm
  • Editorial Team
    Editorial Team added an answer The problem - believe it or not - isn't SubSonic.… May 12, 2026 at 10:08 pm

Related Questions

I am new to programming and come from a non-CS background (no formal degree).
I am in the process of learning Objective-C for Mac/iPhone development and decided to
I am just learning objective-c and iPhone development, and I am really struggling with
I am encountering very infrequent yet annoying SQL deadlocks on a .NET 2.0 webapp

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.