pnutux 0.2.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pnutux-0.2.1/.github/workflows/publish.yml +29 -0
- pnutux-0.2.1/LICENSE +21 -0
- pnutux-0.2.1/PKG-INFO +43 -0
- pnutux-0.2.1/README.md +35 -0
- pnutux-0.2.1/pyproject.toml +16 -0
- pnutux-0.2.1/save.json +1 -0
- pnutux-0.2.1/src/tux/__init__.py +1 -0
- pnutux-0.2.1/src/tux/main.py +259 -0
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
name: Publish to PyPI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
release:
|
|
5
|
+
types: [published]
|
|
6
|
+
|
|
7
|
+
permissions:
|
|
8
|
+
contents: read
|
|
9
|
+
id-token: write
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
pypi-publish:
|
|
13
|
+
runs-on: ubuntu-latest
|
|
14
|
+
|
|
15
|
+
steps:
|
|
16
|
+
- uses: actions/checkout@v4
|
|
17
|
+
|
|
18
|
+
- uses: actions/setup-python@v5
|
|
19
|
+
with:
|
|
20
|
+
python-version: "3.x"
|
|
21
|
+
|
|
22
|
+
- name: Install build
|
|
23
|
+
run: python -m pip install build
|
|
24
|
+
|
|
25
|
+
- name: Build package
|
|
26
|
+
run: python -m build
|
|
27
|
+
|
|
28
|
+
- name: Publish to PyPI
|
|
29
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
pnutux-0.2.1/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 realpnut
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
pnutux-0.2.1/PKG-INFO
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: pnutux
|
|
3
|
+
Version: 0.2.1
|
|
4
|
+
Summary: the ultimate penguin simulator with zero features and 100% gambling addiction
|
|
5
|
+
License-File: LICENSE
|
|
6
|
+
Requires-Python: >=3.8
|
|
7
|
+
Description-Content-Type: text/markdown
|
|
8
|
+
|
|
9
|
+
# tux pet v0.1.2 or v0.1.3 (or maybe even v0.2.0, i stopped counting)
|
|
10
|
+
|
|
11
|
+
i actually updated the code because the level system did literally nothing. now you can throw your hard-earned coins at virtual fish and buy levels like a boss.
|
|
12
|
+
|
|
13
|
+
also added some screen clearing stuff so the terminal doesnt look like a complete mess anymore.
|
|
14
|
+
|
|
15
|
+
### how to run
|
|
16
|
+
`python main.py` (make sure you are in the same folder as `save.json` or it will create a new bird)
|
|
17
|
+
|
|
18
|
+
### what is new
|
|
19
|
+
- **THE SHOP IS REAL (option 6)** - you can now buy:
|
|
20
|
+
- 🐟 Fish (10 coins) -> +5 happiness
|
|
21
|
+
- 🍦 Ice Cream (5 coins) -> +2 happiness
|
|
22
|
+
- 🧸 Toy (15 coins) -> +10 happiness
|
|
23
|
+
- 🆙 Level Up (100 coins) -> literally increases your level number. still does nothing useful, but hey, high number = dopamine.
|
|
24
|
+
- **Better exit command** - you can now type `7`, `0` or just `exit` to close da game.
|
|
25
|
+
- **Cleaner UI** - no more screen scrolling, the code now clears the console properly before rendering.
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
### how to make money (tutorial for broke people)
|
|
30
|
+
|
|
31
|
+
if u want coins because cases are addictive here is how to not be poor:
|
|
32
|
+
|
|
33
|
+
1. **daily login exploit** - open the game. get 10 coins. comes from your system clock. (if you change your OS date to tomorrow, u can probably infinite farm this, but don't tell anyone).
|
|
34
|
+
2. **exploit save.json** - pls dont do it
|
|
35
|
+
3. **gambling (high risk)** - buy a case for 25 coins (option 4).
|
|
36
|
+
- 1% chance for JACKPOT (+100 coins)
|
|
37
|
+
- 20% chance for decent win (+50 coins)
|
|
38
|
+
- 50% chance to get 10 coins back (u lose 15)
|
|
39
|
+
- 29% chance to get absolutely scammed (+0 coins)
|
|
40
|
+
|
|
41
|
+
pro tip: buying ice cream (5 coins for +2 happiness) or fish (10 coins for +5 happiness) in the shop is actually cheaper than using the default "add happiness" option from the main menu (10 coins for +10 happiness is a scam, do the math).
|
|
42
|
+
|
|
43
|
+
still made by me. enjoy the grind.
|
pnutux-0.2.1/README.md
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# tux pet v0.1.2 or v0.1.3 (or maybe even v0.2.0, i stopped counting)
|
|
2
|
+
|
|
3
|
+
i actually updated the code because the level system did literally nothing. now you can throw your hard-earned coins at virtual fish and buy levels like a boss.
|
|
4
|
+
|
|
5
|
+
also added some screen clearing stuff so the terminal doesnt look like a complete mess anymore.
|
|
6
|
+
|
|
7
|
+
### how to run
|
|
8
|
+
`python main.py` (make sure you are in the same folder as `save.json` or it will create a new bird)
|
|
9
|
+
|
|
10
|
+
### what is new
|
|
11
|
+
- **THE SHOP IS REAL (option 6)** - you can now buy:
|
|
12
|
+
- 🐟 Fish (10 coins) -> +5 happiness
|
|
13
|
+
- 🍦 Ice Cream (5 coins) -> +2 happiness
|
|
14
|
+
- 🧸 Toy (15 coins) -> +10 happiness
|
|
15
|
+
- 🆙 Level Up (100 coins) -> literally increases your level number. still does nothing useful, but hey, high number = dopamine.
|
|
16
|
+
- **Better exit command** - you can now type `7`, `0` or just `exit` to close da game.
|
|
17
|
+
- **Cleaner UI** - no more screen scrolling, the code now clears the console properly before rendering.
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
### how to make money (tutorial for broke people)
|
|
22
|
+
|
|
23
|
+
if u want coins because cases are addictive here is how to not be poor:
|
|
24
|
+
|
|
25
|
+
1. **daily login exploit** - open the game. get 10 coins. comes from your system clock. (if you change your OS date to tomorrow, u can probably infinite farm this, but don't tell anyone).
|
|
26
|
+
2. **exploit save.json** - pls dont do it
|
|
27
|
+
3. **gambling (high risk)** - buy a case for 25 coins (option 4).
|
|
28
|
+
- 1% chance for JACKPOT (+100 coins)
|
|
29
|
+
- 20% chance for decent win (+50 coins)
|
|
30
|
+
- 50% chance to get 10 coins back (u lose 15)
|
|
31
|
+
- 29% chance to get absolutely scammed (+0 coins)
|
|
32
|
+
|
|
33
|
+
pro tip: buying ice cream (5 coins for +2 happiness) or fish (10 coins for +5 happiness) in the shop is actually cheaper than using the default "add happiness" option from the main menu (10 coins for +10 happiness is a scam, do the math).
|
|
34
|
+
|
|
35
|
+
still made by me. enjoy the grind.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["hatchling"]
|
|
3
|
+
build-backend = "hatchling.build"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "pnutux"
|
|
7
|
+
version = "0.2.1"
|
|
8
|
+
description = "the ultimate penguin simulator with zero features and 100% gambling addiction"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.8"
|
|
11
|
+
|
|
12
|
+
[project.scripts]
|
|
13
|
+
pnutux = "tux.main:run_game"
|
|
14
|
+
|
|
15
|
+
[tool.hatch.build.targets.wheel]
|
|
16
|
+
packages = ["src/tux"]
|
pnutux-0.2.1/save.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,259 @@
|
|
|
1
|
+
import json
|
|
2
|
+
import os
|
|
3
|
+
import time
|
|
4
|
+
import random
|
|
5
|
+
from datetime import date
|
|
6
|
+
|
|
7
|
+
HOME = os.path.expanduser("~")
|
|
8
|
+
SAVE_FILE = os.path.join(HOME, ".tux_pet_save.json")
|
|
9
|
+
|
|
10
|
+
default_data = {
|
|
11
|
+
"coins": 0,
|
|
12
|
+
"level": 1,
|
|
13
|
+
"name": "",
|
|
14
|
+
"happiness": 50,
|
|
15
|
+
"uses": 0,
|
|
16
|
+
"last_daily": ""
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
def load():
|
|
20
|
+
if os.path.exists(SAVE_FILE):
|
|
21
|
+
with open(SAVE_FILE, "r") as f:
|
|
22
|
+
try:
|
|
23
|
+
return json.load(f)
|
|
24
|
+
except json.JSONDecodeError:
|
|
25
|
+
return default_data.copy()
|
|
26
|
+
return default_data.copy()
|
|
27
|
+
|
|
28
|
+
def save(data):
|
|
29
|
+
with open(SAVE_FILE, "w") as f:
|
|
30
|
+
json.dump(data, f, indent=4)
|
|
31
|
+
|
|
32
|
+
def run_game():
|
|
33
|
+
data = load()
|
|
34
|
+
|
|
35
|
+
if data["uses"] == 0:
|
|
36
|
+
print("yo this is ur first time opening the game")
|
|
37
|
+
name = input("what do u wanna name ur penguin? ")
|
|
38
|
+
if name.strip() == "":
|
|
39
|
+
name = "penguin"
|
|
40
|
+
data["name"] = name
|
|
41
|
+
data["uses"] += 1
|
|
42
|
+
os.system("cls" if os.name == "nt" else "clear")
|
|
43
|
+
|
|
44
|
+
today = str(date.today())
|
|
45
|
+
if data["last_daily"] != today:
|
|
46
|
+
data["coins"] += 10
|
|
47
|
+
data["last_daily"] = today
|
|
48
|
+
print("daily reward claimed! (+10 coins)")
|
|
49
|
+
|
|
50
|
+
print(f"welcome back, mr {data['name']}")
|
|
51
|
+
while True:
|
|
52
|
+
time.sleep(2)
|
|
53
|
+
os.system("cls" if os.name == "nt" else "clear")
|
|
54
|
+
if data["happiness"] <= 20:
|
|
55
|
+
print(" _ ")
|
|
56
|
+
print(" (╥_╥) ")
|
|
57
|
+
print("//-=-\\\\")
|
|
58
|
+
print("(\\_=_/)")
|
|
59
|
+
print(" ^^ ^^ ")
|
|
60
|
+
elif 21 <= data["happiness"] <= 79:
|
|
61
|
+
print(" _ ")
|
|
62
|
+
print(" ( - ) ")
|
|
63
|
+
print("//-=-\\\\")
|
|
64
|
+
print("(\\_=_/)")
|
|
65
|
+
print(" ^^ ^^ ")
|
|
66
|
+
else:
|
|
67
|
+
print(" _ ")
|
|
68
|
+
print(" ( v ) ")
|
|
69
|
+
print("//-=-\\\\")
|
|
70
|
+
print("(\\_=_/)")
|
|
71
|
+
print(" ^^ ^^ ")
|
|
72
|
+
|
|
73
|
+
print("\n=== TUX PET ===")
|
|
74
|
+
print("your pet:", data["name"])
|
|
75
|
+
print("coins:", data["coins"])
|
|
76
|
+
print("happiness:", data["happiness"])
|
|
77
|
+
print("times opened:", data["uses"])
|
|
78
|
+
print("level:", data["level"])
|
|
79
|
+
|
|
80
|
+
print("\nwhat do u wanna do?")
|
|
81
|
+
print("1. show status")
|
|
82
|
+
print("2. change name (cost 50 coins)")
|
|
83
|
+
print("3. add happiness (cost 10 coins)")
|
|
84
|
+
print("4. open a case (cost 25 coins)")
|
|
85
|
+
print("5. talk to the penguin")
|
|
86
|
+
print("6. shop")
|
|
87
|
+
print("7. exit")
|
|
88
|
+
|
|
89
|
+
choice = input("> ")
|
|
90
|
+
|
|
91
|
+
if choice == "1":
|
|
92
|
+
print("\n=== STATUS ===")
|
|
93
|
+
print(data)
|
|
94
|
+
elif choice == "2":
|
|
95
|
+
if data["coins"] >= 50:
|
|
96
|
+
name = input("new name: ")
|
|
97
|
+
if name.strip() != "":
|
|
98
|
+
data["name"] = name
|
|
99
|
+
data["coins"] -= 50
|
|
100
|
+
print("name changed!")
|
|
101
|
+
else:
|
|
102
|
+
print("not enough coins :(")
|
|
103
|
+
elif choice == "3":
|
|
104
|
+
if data["coins"] >= 10:
|
|
105
|
+
data["happiness"] = min(100, data["happiness"] + 10)
|
|
106
|
+
data["coins"] -= 10
|
|
107
|
+
print("your penguin is happier!")
|
|
108
|
+
else:
|
|
109
|
+
print("not enough coins")
|
|
110
|
+
elif choice == "4":
|
|
111
|
+
if data["coins"] >= 25:
|
|
112
|
+
data["coins"] -= 25
|
|
113
|
+
print("opening a case...")
|
|
114
|
+
time.sleep(1)
|
|
115
|
+
cas = random.randint(1, 100)
|
|
116
|
+
if cas == 100:
|
|
117
|
+
print("JACKPOT! You won 100 coins!")
|
|
118
|
+
data["coins"] += 100
|
|
119
|
+
elif cas >= 80:
|
|
120
|
+
print("You won 50 coins!")
|
|
121
|
+
data["coins"] += 50
|
|
122
|
+
elif cas >= 30:
|
|
123
|
+
print("You won 10 coins!")
|
|
124
|
+
data["coins"] += 10
|
|
125
|
+
else:
|
|
126
|
+
print("You didnt win anything!")
|
|
127
|
+
else:
|
|
128
|
+
print("not enough coins")
|
|
129
|
+
elif choice == "5":
|
|
130
|
+
print("1. Compliment the penguin")
|
|
131
|
+
print("2. Be mean")
|
|
132
|
+
print("3. Flirt")
|
|
133
|
+
print("4. Tell a joke")
|
|
134
|
+
print("5. Stare at penguin")
|
|
135
|
+
choi = input("Choose: ")
|
|
136
|
+
if choi == "1":
|
|
137
|
+
print("You tell penguin he is the best bird...\n")
|
|
138
|
+
time.sleep(2)
|
|
139
|
+
print("Penguin is happier now!")
|
|
140
|
+
print(" _ ")
|
|
141
|
+
print(" (·u·) ")
|
|
142
|
+
print("//-=-\\\\")
|
|
143
|
+
print("(\\_=_/)")
|
|
144
|
+
print(" ^^ ^^ ")
|
|
145
|
+
data["happiness"] = min(100, data["happiness"] + 5)
|
|
146
|
+
elif choi == "2":
|
|
147
|
+
print("You tell penguin he is too heavy to fly...\n")
|
|
148
|
+
time.sleep(2)
|
|
149
|
+
print("Why are you so mean to him?")
|
|
150
|
+
print(" _ ")
|
|
151
|
+
print(" (╥_╥) ")
|
|
152
|
+
print("//-=-\\\\")
|
|
153
|
+
print("(\\_=_/)")
|
|
154
|
+
print(" ^^ ^^ ")
|
|
155
|
+
data["happiness"] = max(0, data["happiness"] - 15)
|
|
156
|
+
elif choi == "3":
|
|
157
|
+
print("You flirt with penguin...\n")
|
|
158
|
+
time.sleep(1)
|
|
159
|
+
print("You dont know the result...")
|
|
160
|
+
print(" _ ")
|
|
161
|
+
print(" (~v~) ")
|
|
162
|
+
print("//-=-\\\\")
|
|
163
|
+
print("(\\_=_/)")
|
|
164
|
+
print(" ^^ ^^ ")
|
|
165
|
+
flr = random.randint(0, 1)
|
|
166
|
+
if flr == 0:
|
|
167
|
+
print("Penguin liked it!")
|
|
168
|
+
data["happiness"] = min(100, data["happiness"] + 20)
|
|
169
|
+
else:
|
|
170
|
+
print("Penguin got uncomfortable...")
|
|
171
|
+
data["happiness"] = max(0, data["happiness"] - 10)
|
|
172
|
+
elif choi == "4":
|
|
173
|
+
print("You tell penguin a joke...\n")
|
|
174
|
+
time.sleep(2)
|
|
175
|
+
joke = random.randint(0, 10)
|
|
176
|
+
if joke <= 9:
|
|
177
|
+
print("The joke was good and penguin laughed!")
|
|
178
|
+
print(" _ ")
|
|
179
|
+
print(".·°՞(˃ᗜ˂)՞°·.")
|
|
180
|
+
print("//-=-\\\\")
|
|
181
|
+
print("(\\_=_/)")
|
|
182
|
+
print(" ^^ ^^ ")
|
|
183
|
+
data["happiness"] = min(100, data["happiness"] + 10)
|
|
184
|
+
time.sleep(0.2)
|
|
185
|
+
else:
|
|
186
|
+
print("Couldn't you think of a better joke..?")
|
|
187
|
+
print(" _ ")
|
|
188
|
+
print(" ( - ) ")
|
|
189
|
+
print("//-=-\\\\")
|
|
190
|
+
print("(\\_=_/)")
|
|
191
|
+
print(" ^^ ^^ ")
|
|
192
|
+
data["happiness"] = max(0, data["happiness"] - 5)
|
|
193
|
+
time.sleep(0.4)
|
|
194
|
+
elif choi == "5":
|
|
195
|
+
print("You stared at penguin...\n")
|
|
196
|
+
time.sleep(3)
|
|
197
|
+
print("The penguin stared back!")
|
|
198
|
+
print(" _ ")
|
|
199
|
+
print(" (⏺_⏺) ")
|
|
200
|
+
print("//-=-\\\\")
|
|
201
|
+
print("(\\_=_/)")
|
|
202
|
+
print(" ^^ ^^ ")
|
|
203
|
+
else:
|
|
204
|
+
print("Wrong answer!")
|
|
205
|
+
time.sleep(1)
|
|
206
|
+
elif choice == "6":
|
|
207
|
+
print("You enter the shop...")
|
|
208
|
+
time.sleep(2)
|
|
209
|
+
print("What would you like to buy?")
|
|
210
|
+
print("1. Fish (10 coins)")
|
|
211
|
+
print("2. Ice Cream (5 coins)")
|
|
212
|
+
print("3. Toy (15 coins)")
|
|
213
|
+
print("4. Level Up (100 coins)")
|
|
214
|
+
print("5. Exit Shop")
|
|
215
|
+
shop = input("Enter your choice: ")
|
|
216
|
+
if shop == "1":
|
|
217
|
+
if data["coins"] >= 10:
|
|
218
|
+
print("You bought some fish!")
|
|
219
|
+
data["coins"] -= 10
|
|
220
|
+
data["happiness"] = min(100, data["happiness"] + 5)
|
|
221
|
+
else:
|
|
222
|
+
print("Not enough coins!")
|
|
223
|
+
elif shop == "2":
|
|
224
|
+
if data["coins"] >= 5:
|
|
225
|
+
print("You bought some ice cream!")
|
|
226
|
+
data["coins"] -= 5
|
|
227
|
+
data["happiness"] = min(100, data["happiness"] + 2)
|
|
228
|
+
else:
|
|
229
|
+
print("Not enough coins!")
|
|
230
|
+
elif shop == "3":
|
|
231
|
+
if data["coins"] >= 15:
|
|
232
|
+
print("You bought a toy!")
|
|
233
|
+
data["coins"] -= 15
|
|
234
|
+
data["happiness"] = min(100, data["happiness"] + 10)
|
|
235
|
+
else:
|
|
236
|
+
print("Not enough coins!")
|
|
237
|
+
elif shop == "4":
|
|
238
|
+
if data["coins"] >= 100:
|
|
239
|
+
print("You leveled up!")
|
|
240
|
+
data["coins"] -= 100
|
|
241
|
+
data["level"] += 1
|
|
242
|
+
else:
|
|
243
|
+
print("Not enough coins to level up!")
|
|
244
|
+
elif shop == "5":
|
|
245
|
+
print("Exiting shop...")
|
|
246
|
+
else:
|
|
247
|
+
print("Invalid option!")
|
|
248
|
+
elif choice == "7" or choice.lower() == "exit" or choice == "0":
|
|
249
|
+
save(data)
|
|
250
|
+
print("bye")
|
|
251
|
+
break
|
|
252
|
+
else:
|
|
253
|
+
print("invalid option")
|
|
254
|
+
|
|
255
|
+
data["happiness"] = max(0, min(100, data["happiness"]))
|
|
256
|
+
save(data)
|
|
257
|
+
|
|
258
|
+
if __name__ == "__main__":
|
|
259
|
+
run_game()
|