Cricket RNGMade with C++
This is a rng generator that is weighted to make it more realistic for cricket. The program randomly generates a number between 1 and 100 and if that number falls between a certain range, a certain value is displayed in the console. This also includes run rate, total score/wickets, wides, timelines of overs and a full timeline of each inning, powerplay weighted percentages and special percentages when a score is high or low, etc.
Most people on replit are from America so a lot of you won't know what cricket is. If so ask away in the comments and I will do my best to help!
Oh and yes this is a console program built in C++. I understand it is a bit simple but have tons of features planned in my trello.
If you think any of the percentages should be changed, or if you find any bugs (most are related to all out as that doesn't happen frequently), please feel free to tell me in the comments!Recent comments (20)RishiGouni6 months ago
coolCoderGautamYT6 months ago
Great game!Pleasepeoplelookatmyrepls9 months ago
I don't play cricket but i know the rules (this game is SO fun)Whippingdot10 months ago
Though I made this update for the Creator's Fund and actually missed the deadline due to my internet dying, this project still was terrific for me. It taught me about UB (Undefined Behavior) and OOB (Out of Bounds), two essential contents for errors in C++. I also learned ways to make the code function faster and reduce the size of the code, as the code was a bit lengthy.
Thanks creator fund for the 'opportunity', though I didn't deliver lmho!
Oh and if you are wondering why I had to wait until the last minute to submit, it was a mixture of laziness, me not knowing the creator fund was only for three months, late responses from helpers on discord, and UB errors (which wasted over a week of me trying to find out why first the program crashed when incrementing and integer and second why pushing back to a vector crashed the program).
Oh, one last thing - I reduced the code's length from 709 characters to 472 (237 difference), this being the major change in the program as I didn't add any new features. I felt like bug fixes (mainly occurring with all out messages) needed to be attended to and the code's repetition needed to be cut as it added way too much extra lines.VulcanWM10 months ago
hey this is really cool!RohilPatel10 months ago
gimme lbwWhippingdot1 year ago
I added a better intro screen that allows you to continuously have different matches (like if you finish one you get a choice to continue). There is also a better explanation of what cricket is if you choose and option and a how to play that tells you how I use this program to play a game.
Also instead of spamming c and enter all you have to do is press enter now to continue. You can also hold enter to skip through the game.
If wanted ask in comments and I will add a barrier of spamming enter in a match where an innings ends so you know how much was hit in the first innings and who won in the second innings.
Language-TutorialsMade with Bash
These are tutorials for the coding languages I know. This is both for learning use for you, and for me in the future.Recent comments (0)
About-PageMade with Node.js
This is a profile for all of the replit coders! It will be updated with new profiles constantly!Recent comments (42)RixTheTyrunt1 year ago
Can I join?Yoplayer1py2 years ago
Do I need to have a humongous amount of projects tht are rlly cool to make a profile ...ColePete2 years ago
was i removed?glitchish2 years ago
Was I removed?RohilPatel2 years ago
Lol why was I removed?Coder1002 years ago
Lol why was I removed?icodeletion2 years ago
Can I join @Whippingdot ?Mrunank2 years ago
IT Says github.com refused to connect