Coder Social home page Coder Social logo

bowling_score_calculator's Introduction

Bowling Score Calculator

Version: 0.1.0 (Alpha)

Table of Contents

  1. Introduction
  2. Installation
  3. Known Issues
  4. Testing
  5. Future Optimizations

Introduction

The Bowling Score Calculator is a Python application designed to help you keep track of your scores while playing a game of 10-pin bowling. It provides a user-friendly interface for recording each throw, calculating scores, and displaying the progress of the game. This alpha version of the program is a basic implementation that allows you to enter the number of pins knocked down in each throw and provides real-time scoring. The overall goal of this project was to build a professional app following OOP principles for a robust and extensible design.

Installation

To run the Bowling Score Calculator, follow these steps:

  1. Prerequisites:

  2. Download the Application:

    • Download the source code.
  3. Run the Application:

    • Navigate to the application directory.
    • Run the bowling_app.py script using Python.
  4. Navigation:

    • Use keyboard keys 0-9, x, X, and / to enter scores.
    • Use mouse to click the RESET button.

Known Issues

  1. In the current version, the application may not handle certain edge cases correctly, leading to inaccurate scoring under certain circumstances. Some of these include:

    • More thorough handling of reaching the 10th Frame.
    • Scoring of all Strikes displays the score incorrectly on Throw #20, and there are some other small discrepancies like this where the score displays earlier/later than intended.
    • Throw #20 should not allow a Spare if Throw #19 was a Strike.
    • Throw #21 should not be allowed if Frame 10 is an Open Frame after Throw #20.
  2. The user interface is basic, and there is limited error handling for invalid inputs.

    • The GUI had to be re designed to a simpler less elegant version, since there were issues accessing labels when attempting to nest widgets.
    • Some of the error messages are not specific.
    • Not all edge cases have error messages.
  3. Some keyboard shortcuts or special characters might not be handled properly, potentially leading to unexpected behavior.

    • Basic keys will be recognized but a variety of keyboards was not tested.

Testing

To run the test suite for the Bowling Score Calculator, you can use the included bowling_test.py script found in the tests directory. This script contains unit tests to verify the correctness of the scoring logic.

Future Optimizations

  1. Address and fix the known issues to ensure accurate scoring, additional error messaging, and improved user experience.

  2. Address more edge cases.

  3. Refactor the code for a more elegant and accurate design, reevaluating the architecture.

    • Re work the logic and design to be more elegant and accurate.
    • Was attempting to be clever with the way Frames were rendered and the score was counted/calculated, which caused some issues with iterating through frames and throws.
    • MVC may not be the most appropriate architecture, especially since PyQt has a Model-View architecture.
    • The styling could be further broken out from the view.
    • Additional sub directories can further organize the project.
  4. Enhance the user interface to make it more visually appealing and user-friendly.

    • PyQt6 was chosen since it had the most ability to be expanded for professional use. However, Qt Designer could not be used with PyQt6 and Python 3.12, which limited design options.
  5. This application was only tested on Windows 10 Home. Extend platform compatibility by testing on various operating systems.

  6. Build executable(s) to make the app easy to run for end users.

  7. Improve test coverage and implement additional unit tests to ensure code quality and reliability.

  8. In the long term, consider implementing new features, such as support for multiple games, multiple users, and visualizations of pin placements.

bowling_score_calculator's People

Contributors

unicorn-star-tech avatar crockeo avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.