A little project just to learn Python
It's Y-Independent because im bored to make every single row slot independent and because i did it faster i can
The code will only check if Y axis is the same, Example:
X Y Y
X Y Y
X Y Y
It's so simple, like, very very simple, dont judge me 😢
I plan on improving it and probably in future create a pygame or tkinter gui for that, on console looks really ugly!
By the way, I created a video doing this game from scratch, go check it out! https://youtu.be/Csyg3R8NMV0
python3 game.py
, the jackpot will start at 0 in each slot, if you say y
or yes
, it will re-roll the jackpot, if you say n
or no
, it will exit the program!
Player wins when they get 3 same slots in Y-axis
First of all, sets three (3) emojis:
boom = '💥'
money = '💲'
trident = '⚜'
Then put them on a charList, which will replace row1/2/3 with their respective emojis.
After that, sets the function game()
which is the main core of the game, it beings saying what is the initial state of the Jackpot, which (ever) will probably show [ 0 ]
in every single slot.
Then, it asks what you want to do, if you want to re-roll or just quit the game.
If you chose re-roll, it will trigger the randomize()
function, which does:
- Shuffle each char list and replace all the rows with the new char list.
- Trigger
checkSame()
function, which simple check if a row has the same emoji in every Y-axis row. If it does, just tell you!