From 340aea210b8a449d427424fa96960d146d918779 Mon Sep 17 00:00:00 2001 From: QinCai-rui <140027854+QinCai-rui@users.noreply.github.com> Date: Sat, 26 Jul 2025 11:41:50 +1200 Subject: [PATCH 1/5] md lint --- README.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 918a61c..261cedd 100755 --- a/README.md +++ b/README.md @@ -8,28 +8,28 @@ If confused how to install: 1. Open Terminal or Command Prompt with Python and `python3-pip` installed 2. Use one of the commands - + ```sh pip install luck-room-v1 ``` - + ```sh pip3 install luck-room-v1 ``` - + ```sh pipx install luck-room-v1 ``` - + ```sh python3 -m pip install luck-room-v1 ``` -4. Make sure the most recent version is installed (if you installed any previous versions you may need to uninstall and install again) +3. Make sure the most recent version is installed (if you installed any previous versions you may need to uninstall and install again) -5. Use the command `luckroom` to play the game +4. Use the command `luckroom` to play the game -6. Enjoy c: +5. Enjoy c: ### As of for now this is my steps to successding this project: From 9ff0fd726969ae363cbb31ab360ac11b877f5932 Mon Sep 17 00:00:00 2001 From: QinCai-rui <140027854+QinCai-rui@users.noreply.github.com> Date: Sat, 26 Jul 2025 11:48:20 +1200 Subject: [PATCH 2/5] Fix all linting problems --- README.md | 90 +++++++++++++++++++++++++++++++++++-------------------- 1 file changed, 58 insertions(+), 32 deletions(-) diff --git a/README.md b/README.md index 261cedd..c9675f2 100755 --- a/README.md +++ b/README.md @@ -1,7 +1,9 @@ # Python-Learn-Gamble + The repo/project is based on learning how to code in python with a touch of experience and creating a game at the end to show my still (Gambling Game). -# PyPi +## PyPi + If your seeing this on the PyPi then most of this is irrelevant. If confused how to install: @@ -31,40 +33,67 @@ If confused how to install: 5. Enjoy c: -### As of for now this is my steps to successding this project: +## Learning Goals 1. Learn the basics on how to code -2. Make a small little game to show my understanding -3. Learn the more difficult parts on how to code -4. Try to make the gambling game -5. Make it better -6. Possibly make it into a Desktop game - -### Working -1) My whole learning explanation is in my learn.py file but here I'm going to explain, and show my understanding here. P.S. I realised that it will take way too long and it won't be interesting so I'm going to jsut do a few, the very baiscs. -### Basic Functions: -**print()** - A command that prints out what ever is in the '()' or brackets. This can be anything -**Example:** + ```python + print("This is how you print messages") + + if x > 5: + print("This is how you use if statements") + ``` - print("This is how you print messages") +2. Learn the more difficult parts on how to code -**If statment** - A statement which adds a condition to use a block of code. This can be done by writing 'if' on a new line followed by the condition and lastly the action. +3. Try to make the gambling game -**Example:** + ```python + # This is a comment + ''' + Multi + line + comment + ''' + ``` - if x > 5 - print("This is how you use if statments") +**print()** – A command that prints out whatever is in the parentheses `()`. This can be anything. +```python +x = 54 -**Comments** - A feature where you can write notes that won't effect the code. You can do this by using a '#' then your message. You can also make multi-line comments by surounding the text in triple quotes ,""", or ,''',. +HackClub_SummerOfMaking = "yay" - # Comment +Bob, Kyle, Lisa = 1, 2, 3 - ''' - Multi - line - comment - ''' +**Example:** +print(y) + +print(x + y) +``` + +```python +global +``` +print("This is how you print messages") +```python +x = 65 +print(type(x)) +``` +**If statement** – A statement that adds a condition to a block of code. This can be done by writing `if` on a new line, followed by the condition and then the action. +1) I want to try to make a small simple game to show my understanding. I'm thinking of making a single shop where you can buy stuff or making a simpler gamble game like coin flip, dice roll, guess the number, or guess the card. +**Example:** +2) Learning the difficult parts of the game is going to be connected with my next goal, which is to make a gambling game. + if x > 5: +3) My end project is a gambling game. I'm not really planning to create a new gambling game, so I'm going to just recreate gambling games that already exist. For my game, I'm planning to have a place where you can access all kinds of gambling games. For those games, I'm planning to include: Blackjack, roulette, slots, and ride the bus. If I can, I want to try to create some other games like poker, liar's dice, and liar's deck. These games are more difficult because I would need to create a computer player or an AI for the player to compete against (or make it connect to real-life people, but I’m not that good). + +```python +# This is a comment +''' +Multi +line +comment +''' +``` **Variables** - A statement, connecting a certain name to a value. **Variables** has rules to naming variabales. It must only include letters a-z, A-Z, 0-9 and '_'. When naming variables, variables are case sensitive to a is different to A. If you use symbols like '*' or '#', will cause an error as well as naming your variable a special word in Python like 'if' or 'else'. You can assign multiple values to multiple variables by adding commas or ',' between every value or variable. With the print command, you can use a variable in it. You can also combine variables using '+' or ',', This can be done with all kinds of variabale. If a variable is not inside any function or code (code with indent or ' ') they are considered global variables where any code can use it. Code that is defined in a function or in another code is called a local variable and other blocks of code, outside of the code defining it, can't use it. @@ -81,7 +110,6 @@ Example: print(x + y) - **Global** - A command that will classify, mainly, defining variables, as a global variables no matter where it is. global @@ -99,18 +127,16 @@ Example: **Data type:** str or string - A data type, under the word catagory, is the only data type that hold a word. -2) I want to try to make a small simple game to show my understanding. I'm thinking of making a simgle shop where you can buy stuff or making a +2) I want to try to make a small simple game to show my understanding. I'm thinking of making a simgle shop where you can buy stuff or making a simpler gamble game like coin flip, dice roll, guess number or guess card. I've created the mini game in the MiniGame.py which I like to call, Luck Room. I used many features I would like to use for my main game. I'm also hopping that I'm able to use pygame and pygbag to make the game on a website. - 3) Learning the difficult parts of th game is going to be conected with my 4th goal which is to make a gambaling game - -4) My end projct is a gambaling game. Now I'm not really planning to create a new gambaling game so I'm going to just recreate gambaling games -that there already is. For my game I'm planning to have a game where you can access all kind of gambaling games. For those games I'm planning -to have: Blackjack, roulette, slots and ride the bus. If I can, I want to try to create some other games liks, poker, liar's dice and liar's +4) My end projct is a gambaling game. Now I'm not really planning to create a new gambaling game so I'm going to just recreate gambaling games +that there already is. For my game I'm planning to have a game where you can access all kind of gambaling games. For those games I'm planning +to have: Blackjack, roulette, slots and ride the bus. If I can, I want to try to create some other games liks, poker, liar's dice and liar's deck. These games are more difficult because I would need to create a computor player or an AI or the player to verse (for make it connect to real life people but I ain't that good). I have reserched into my next game where I'm going to add common casino games. I also need to figure out how to use pygame and pygbag. From ecc408dfca9ac6b9a4d7b16fa4b2c693e9a4ce11 Mon Sep 17 00:00:00 2001 From: QinCai-rui <140027854+QinCai-rui@users.noreply.github.com> Date: Sat, 26 Jul 2025 11:49:11 +1200 Subject: [PATCH 3/5] more linting --- README.md | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/README.md b/README.md index c9675f2..56002ba 100755 --- a/README.md +++ b/README.md @@ -57,7 +57,51 @@ If confused how to install: ''' ``` +## Python Concepts + **print()** – A command that prints out whatever is in the parentheses `()`. This can be anything. + +**Example:** + +```python +x = 54 +HackClub_SummerOfMaking = "yay" +Bob, Kyle, Lisa = 1, 2, 3 + +print(y) +print(x + y) +``` + +**global** - A command that will classify, mainly, defining variables, as a global variables no matter where it is. + +```python +global +``` + +**type()** - A command that you can use to find the type of data type a variable holds + +```python +x = 65 +print(type(x)) +``` + +**If statement** – A statement that adds a condition to a block of code. This can be done by writing `if` on a new line, followed by the condition and then the action. + +**Example:** + +```python +if x > 5: + print("This is greater than 5") +``` + +## Project Goals + +1. I want to try to make a small simple game to show my understanding. I'm thinking of making a single shop where you can buy stuff or making a simpler gamble game like coin flip, dice roll, guess the number, or guess the card. + +2. Learning the difficult parts of the game is going to be connected with my next goal, which is to make a gambling game. + +3. My end project is a gambling game. I'm not really planning to create a new gambling game, so I'm going to just recreate gambling games that already exist. For my game, I'm planning to have a place where you can access all kinds of gambling games. For those games, I'm planning to include: Blackjack, roulette, slots, and ride the bus. If I can, I want to try to create some other games like poker, liar's dice, and liar's deck. These games are more difficult because I would need to create a computer player or an AI for the player to compete against (or make it connect to real-life people, but I'm not that good). + ```python x = 54 @@ -80,10 +124,13 @@ x = 65 print(type(x)) ``` **If statement** – A statement that adds a condition to a block of code. This can be done by writing `if` on a new line, followed by the condition and then the action. + 1) I want to try to make a small simple game to show my understanding. I'm thinking of making a single shop where you can buy stuff or making a simpler gamble game like coin flip, dice roll, guess the number, or guess the card. + **Example:** 2) Learning the difficult parts of the game is going to be connected with my next goal, which is to make a gambling game. if x > 5: + print("This is how you use if statements") 3) My end project is a gambling game. I'm not really planning to create a new gambling game, so I'm going to just recreate gambling games that already exist. For my game, I'm planning to have a place where you can access all kinds of gambling games. For those games, I'm planning to include: Blackjack, roulette, slots, and ride the bus. If I can, I want to try to create some other games like poker, liar's dice, and liar's deck. These games are more difficult because I would need to create a computer player or an AI for the player to compete against (or make it connect to real-life people, but I’m not that good). ```python From 62da5530dbaae4ce26e4fdcc2eeaf94671103388 Mon Sep 17 00:00:00 2001 From: QinCai-rui <140027854+QinCai-rui@users.noreply.github.com> Date: Sat, 26 Jul 2025 11:51:53 +1200 Subject: [PATCH 4/5] even more linting :skull: --- README.md | 56 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/README.md b/README.md index 56002ba..04a3183 100755 --- a/README.md +++ b/README.md @@ -102,6 +102,59 @@ if x > 5: 3. My end project is a gambling game. I'm not really planning to create a new gambling game, so I'm going to just recreate gambling games that already exist. For my game, I'm planning to have a place where you can access all kinds of gambling games. For those games, I'm planning to include: Blackjack, roulette, slots, and ride the bus. If I can, I want to try to create some other games like poker, liar's dice, and liar's deck. These games are more difficult because I would need to create a computer player or an AI for the player to compete against (or make it connect to real-life people, but I'm not that good). +## Data Types and Variables + +**Variables** - A statement, connecting a certain name to a value. Variables have rules for naming. They must only include letters a-z, A-Z, 0-9 and '_'. When naming variables, variables are case sensitive so 'a' is different from 'A'. If you use symbols like '*' or '#', it will cause an error, as well as naming your variable a special word in Python like 'if' or 'else'. You can assign multiple values to multiple variables by adding commas between every value or variable. With the print command, you can use a variable in it. You can also combine variables using '+' or ','. This can be done with all kinds of variables. If a variable is not inside any function or code (code with indent), they are considered global variables where any code can use it. Code that is defined in a function or in another code is called a local variable and other blocks of code, outside of the code defining it, can't use it. + +**Example:** + +```python +x = 54 +HackClub_SummerOfMaking = "yay" +Bob, Kyle, Lisa = 1, 2, 3 + +y = 65 +print(y) +print(x + y) +``` + +**Global** - A command that will classify variables as global variables no matter where they are defined. + +```python +global variable_name +``` + +**type()** - A command that you can use to find the data type a variable holds + +```python +x = 65 +print(type(x)) +``` + +### Data Types + +**Data type: Int or Integer** - A data type, which is under the category numbers, which values or output can only be in integers (or whole numbers) + +**Data type: Float** - A data type, which is under the category numbers, which can contain any amount of decimals. + +**Data type: Complex** - A data type, which is under the category numbers, which contains complex numbers like 'j' + +**Data type: str or string** - A data type, under the word category, is the only data type that holds a word. + +## Project Development Progress + +1. I want to try to make a small simple game to show my understanding. I'm thinking of making a simple shop where you can buy stuff or making a simpler gamble game like coin flip, dice roll, guess the number, or guess the card. + + I've created the mini game in the MiniGame.py which I like to call, Luck Room. I used many features I would like to use for my main game. I'm also hoping that I'm able to use pygame and pygbag to make the game on a website. + +2. Learning the difficult parts of the game is going to be connected with my next goal, which is to make a gambling game. + +3. My end project is a gambling game. Now I'm not really planning to create a new gambling game so I'm going to just recreate gambling games that already exist. For my game I'm planning to have a place where you can access all kinds of gambling games. For those games I'm planning to have: Blackjack, roulette, slots and ride the bus. If I can, I want to try to create some other games like poker, liar's dice and liar's deck. These games are more difficult because I would need to create a computer player or an AI for the player to compete against (or make it connect to real life people but I'm not that good). + + I have researched into my next game where I'm going to add common casino games. I also need to figure out how to use pygame and pygbag. + + I have concluded my research to figure out a key part of my game. Due to me writing in python, I couldn't easily make my game for a website because python is more suited for desktop and terminal games. This caused me to think long and hard about what I was going to do. I decided that I should learn how to code in Javascript, HTML and CSS. This is so I can create my project on the web and design each function exactly how I want it. I want to create a game which includes popular gambling games. I also wanted to try make this game high quality but I might rush things so I just want to take my time. + ```python x = 54 @@ -118,11 +171,14 @@ print(x + y) ```python global ``` + print("This is how you print messages") + ```python x = 65 print(type(x)) ``` + **If statement** – A statement that adds a condition to a block of code. This can be done by writing `if` on a new line, followed by the condition and then the action. 1) I want to try to make a small simple game to show my understanding. I'm thinking of making a single shop where you can buy stuff or making a simpler gamble game like coin flip, dice roll, guess the number, or guess the card. From 28d662ddd806854fecb106e0d9a15df09243471b Mon Sep 17 00:00:00 2001 From: QinCai-rui <140027854+QinCai-rui@users.noreply.github.com> Date: Sat, 26 Jul 2025 11:54:02 +1200 Subject: [PATCH 5/5] revert grammarly fix --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 04a3183..6e73d67 100755 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ If confused how to install: 5. Enjoy c: -## Learning Goals +## As of for now this is my steps to successding this project: 1. Learn the basics on how to code