I thought somehow to write something on the "snake" ... Something interesting. The last little project was called Blackjack and was borrowed from one Python training site.
This project should be its own notion written in Python, moreover, a game. I did not want to spend time and write something that would devour its gigantic amount. Therefore, I decided to focus on the simple - on the “cubes”.
The essence of the game is this: you and the opponent (casino dealer), at first you choose a “loan” for yourself, that is, the amount that will be in your virtual “pocket”. Bets are placed in a common “bank”. This is followed by bets and dice rolls. You and your opponent successively roll two dice and the “pot” goes to the one with the most points. If the same amount falls, you and the opponent roll the dice again. The point is simple.
Well, first, we’ll run the help:
b - bet (bet);
c - credit (credit);
t - throw of cubes (throw);
Next, open Anaconda and start writing code:
Yes, yes, it’s not perfect - there is something that can be “finished off with a file” ... But, as Vovka from the far-away kingdom said:
And then I decided to check out, really "Mona", playing on one simple tactics:
- We put 100;
- If the bet wins, we bet one hundred again. If loses, we bet twice as much. Go to + ?!
Started with a thousand:
And put a hundred:
And, strangely enough, from 1000 he increased the capital to 2700! - Works!
The system is working. But it works with a random distribution (and not “finished” in favor of “know whom”). Something like this. I hope you will not throw tomatoes!
PS Games are cool! A small piece of childhood, torn from time.