Git Product home page Git Product logo

darts_scoring's Introduction

darts_scoring

Python program designed to score various darts games from the command line

During COVID, some buddies and I began playing darts over zoom. I created this program so that I should share my screen and we could easily score various dart games.

** 2/1/2022 I've added a play-against-the-computer mode where you can specify the desired level of opposition for Legs, Golf, X01, and Cricket

** August 2022 - Streamlined menu, added undo functionality to training mode and cutthroat, fixed bug in multiplayers mode for games eligible for training, added error message for exception handling, enhanced scratch bringback functionality for cutthroat, added around the world for multiplayer and training, added training mode for follow the leader, added ability to save training history.

How to use

The program is admittedly not super intuitive, so I've included some detailed instructions on how to use

-- At startup, enter player names with comma and space separating
-- Example:
-- Player1, Player2
-- Teams are randomly assigned for games so no need to worry about input order
-- If only one player is provided, you will then be prompted to specify the level of computer opponent you wish to play
-- If you want to play against multiple computer opponents, you can add multiple players with the name "Opponent", and training mode defaults to beginner

Cricket


-- darts are scored with a lowercase 't','d','s' and then the number scored and a comma separating darts
-- here is an example of triple 20, 19, 18 in the same turn
t20,t19,t18


-- if an error is thrown the user will be reprompted to enter the darts
-- if you accidently score the wrong darts you can type "undo" and the previous turn will be restored
-- if you miss all three darts you can type "miss" to advance to the next turn
-- to exit the game you can type "exit"

Spanish


-- same instructions as cricket

Minnesota


-- same instructions as cricket
-- after entering your darts you will be prompted for an extra score
-- this is providing you the option to record points scored on a closed triple, double or bed
-- for example, let's say I've closed 20s as has my opponent, but I've also closed beds
-- if I hit three single 20s I would score my turn as "miss" and then enter 60 as the extra score to be scored

X01


-- simply enter the number of points scored on that turn

Around The World


-- played starting at 20 working down to 1, singles advance one number, doubles two, triples three
-- after hitting 1, you must hit three bullseyes to win
-- played with continuation, where if the final dart in a turn hits, that player's teammate immediately follows to continue the turn
-- also played with redemption, where once a team hits three bulls, the other team has one more turn to try to match
-- for scoring, simply enter the last number you've hit, and for bulls enter the number of bulls as capital Bs (e.g. B, BB, BBB)

Legs


-- simply enter the number of points scored on that turn

Follow the leader


-- darts are scored with a lowercase 't','d','s' and then the number scored and a comma separating darts
-- if the dart is missed type "miss", if it is hit then input the new dart to hit
-- for example if the dart to hit is single 20, and I hit this dart and then a double 5, I would simply enter d5

Golf


-- simply enter the number of points scored for that hole

Killer


-- enter comma separated inputs with the following order:
-- number of own darts hit, player targeted, number of their darts hit
-- this can be repeated for multiple other players targeted
-- for example let's say I have 2 lives and each of my opponents has 1 life left
-- I could win the game with the following sequence:
-- 1,Player 2,1,Player 3,1

Cutthroat cricket


-- same instructions as cricket
-- for those unfamiliar this is a multi-player version of the game where the goal is to have the lowest number of points
-- for example: if I've closed 20s and no one else has and I hit a single 20, then my score remains the same but all of my opponents have their scores increased by 20

Cutthroat


-- this game is modeled off of the multi-player pool game cutthroat
-- entering your darts follows the same approach as cricket
-- the goal is to hit other player's numbers without hitting your own
-- if you do hit your own number you will have scratched, and your opponents will each get to bring that many darts back
-- currently you can only bring darts back on a single numbers per person, but I may expand the functionality so you can add scratch darts back to multiple numbers
-- for example if an opponent scratches hitting a triple being able to bring back 1 live on three separate numbers rather than 3 on a single number

Planned future enhancements


-- moving this program from the command line to the browser, and then potentially hosting on a server and allowing clients to access directly rather than through screen share
-- adding user profiles and history, so that statistics can be tracked across sessions and league-style play can be supported
-- adding an AI-based training mode where opponent play is simulated and is adaptive to the user's performance

darts_scoring's People

Contributors

bigkev47 avatar dmcdonough26 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.