tmscli 0.6.1__tar.gz → 0.6.2__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.
- {tmscli-0.6.1 → tmscli-0.6.2}/PKG-INFO +1 -1
- {tmscli-0.6.1 → tmscli-0.6.2}/pyproject.toml +1 -1
- {tmscli-0.6.1 → tmscli-0.6.2}/src/tmscli/.scores/high_scores.csv +1 -0
- {tmscli-0.6.1 → tmscli-0.6.2}/src/tmscli/about.html +2 -3
- tmscli-0.6.2/src/tmscli/img/big.jpg +0 -0
- tmscli-0.6.2/src/tmscli/img/midgame.jpg +0 -0
- tmscli-0.6.2/src/tmscli/img/new_board.jpg +0 -0
- tmscli-0.6.2/src/tmscli/img/win.jpg +0 -0
- {tmscli-0.6.1 → tmscli-0.6.2}/src/tmscli/index.html +2 -3
- {tmscli-0.6.1 → tmscli-0.6.2}/src/tmscli/install.html +11 -7
- {tmscli-0.6.1 → tmscli-0.6.2}/src/tmscli/main.py +13 -10
- {tmscli-0.6.1 → tmscli-0.6.2}/src/tmscli/play.html +3 -7
- {tmscli-0.6.1 → tmscli-0.6.2}/src/tmscli/screenshots.html +2 -3
- {tmscli-0.6.1 → tmscli-0.6.2}/src/tmscli/style.css +9 -5
- tmscli-0.6.1/src/tmscli/changelog.html +0 -111
- tmscli-0.6.1/src/tmscli/img/big.jpg +0 -0
- tmscli-0.6.1/src/tmscli/img/midgame.jpg +0 -0
- tmscli-0.6.1/src/tmscli/img/new_board.jpg +0 -0
- tmscli-0.6.1/src/tmscli/img/win.jpg +0 -0
- {tmscli-0.6.1/video and storyboard → tmscli-0.6.2/.video and storyboard}/pyauto.py +0 -0
- {tmscli-0.6.1/video and storyboard → tmscli-0.6.2/.video and storyboard}/script.txt +0 -0
- {tmscli-0.6.1/video and storyboard → tmscli-0.6.2/.video and storyboard}/vid.py +0 -0
- {tmscli-0.6.1 → tmscli-0.6.2}/README.md +0 -0
- {tmscli-0.6.1 → tmscli-0.6.2}/initialise.sh +0 -0
- {tmscli-0.6.1 → tmscli-0.6.2}/src/tmscli/.gitkeep +0 -0
- {tmscli-0.6.1 → tmscli-0.6.2}/src/tmscli/__init__.py +0 -0
- {tmscli-0.6.1 → tmscli-0.6.2}/update.sh +0 -0
|
@@ -13,10 +13,9 @@
|
|
|
13
13
|
<div class="logo">tmscli</div>
|
|
14
14
|
<nav>
|
|
15
15
|
<a href="index.html">main</a>
|
|
16
|
-
<a href="about.html">about</a>
|
|
16
|
+
<a href="about.html" class="active">about</a>
|
|
17
17
|
<a href="install.html">installation + usage</a>
|
|
18
18
|
<a href="screenshots.html">screenshots</a>
|
|
19
|
-
<a href="changelog.html">changelog</a>
|
|
20
19
|
<a href="play.html">play</a>
|
|
21
20
|
</nav>
|
|
22
21
|
</div>
|
|
@@ -39,7 +38,7 @@
|
|
|
39
38
|
|
|
40
39
|
<div class="about-section">
|
|
41
40
|
<h2>Customisation</h2>
|
|
42
|
-
<p>tmscli lets you adjust the game to your liking — board size, difficulty, and display format. The v0.
|
|
41
|
+
<p>tmscli lets you adjust the game to your liking — board size, difficulty, and display format. The v0.6.1 release added minor fixes to the scoreboard, and v0.5.0 - v0.6.0 brought a scoring system and colors to the minesweeper field.</p>
|
|
43
42
|
</div>
|
|
44
43
|
</main>
|
|
45
44
|
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -16,7 +16,6 @@
|
|
|
16
16
|
<a href="about.html">about</a>
|
|
17
17
|
<a href="install.html">installation + usage</a>
|
|
18
18
|
<a href="screenshots.html">screenshots</a>
|
|
19
|
-
<a href="changelog.html">changelog</a>
|
|
20
19
|
<a href="play.html">play</a>
|
|
21
20
|
</nav>
|
|
22
21
|
</header>
|
|
@@ -37,9 +36,9 @@
|
|
|
37
36
|
</div>
|
|
38
37
|
</div>
|
|
39
38
|
|
|
40
|
-
<div class="
|
|
39
|
+
<div class="main-text">
|
|
41
40
|
<h2>Latest updates</h2>
|
|
42
|
-
<p><strong>v0.
|
|
41
|
+
<p><strong>v0.6.1</strong> Scoring leaderboard, colors and bug fixes.</p>
|
|
43
42
|
</div>
|
|
44
43
|
</main>
|
|
45
44
|
|
|
@@ -16,7 +16,6 @@
|
|
|
16
16
|
<a href="about.html">about</a>
|
|
17
17
|
<a href="install.html" class="active">installation + usage</a>
|
|
18
18
|
<a href="screenshots.html">screenshots</a>
|
|
19
|
-
<a href="changelog.html">changelog</a>
|
|
20
19
|
<a href="play.html">play</a>
|
|
21
20
|
</nav>
|
|
22
21
|
</div>
|
|
@@ -29,7 +28,7 @@
|
|
|
29
28
|
<div class="install-card">
|
|
30
29
|
<h2>Install from PyPI</h2>
|
|
31
30
|
<pre><code>pip install tmscli</code></pre>
|
|
32
|
-
<p>Once installed, the <code>
|
|
31
|
+
<p>Once installed, the <code>tms</code> command becomes available in your terminal.</p>
|
|
33
32
|
</div>
|
|
34
33
|
|
|
35
34
|
<div class="usage-section">
|
|
@@ -67,13 +66,13 @@
|
|
|
67
66
|
</table>
|
|
68
67
|
|
|
69
68
|
<h3>Examples</h3>
|
|
70
|
-
<pre><code>
|
|
69
|
+
<pre><code>tms</code></pre>
|
|
71
70
|
<p>Start with the default 9×9 board and 5 mines.</p>
|
|
72
71
|
|
|
73
|
-
<pre><code>
|
|
72
|
+
<pre><code>tms -s 16 -m 40</code></pre>
|
|
74
73
|
<p>Start with a 16×16 board containing 40 mines.</p>
|
|
75
74
|
|
|
76
|
-
<pre><code>
|
|
75
|
+
<pre><code>tms --rules</code></pre>
|
|
77
76
|
<p>Read the rules first, then start the game.</p>
|
|
78
77
|
</div>
|
|
79
78
|
|
|
@@ -121,10 +120,15 @@ x
|
|
|
121
120
|
|
|
|
122
121
|
V</code></pre>
|
|
123
122
|
</div>
|
|
123
|
+
<div class="usage-section">
|
|
124
|
+
<h2>To obtain top scores</h2>
|
|
125
|
+
<p>use command <code>top_score</code> for the default top 5</p>
|
|
126
|
+
<p>Alternatively, use <code>top_score -s SCORES</code> for the top <code>SCORES</code> amount of scores</p>
|
|
124
127
|
|
|
125
|
-
|
|
128
|
+
</div>
|
|
129
|
+
<div class="foot-note">
|
|
126
130
|
<h2>Version note</h2>
|
|
127
|
-
<p>v0.
|
|
131
|
+
<p>v0.6.1 fixed most bugs that occured when using the leaderboard. Update with:</p>
|
|
128
132
|
<pre><code>pip install --upgrade tmscli</code></pre>
|
|
129
133
|
</div>
|
|
130
134
|
</main>
|
|
@@ -3,9 +3,9 @@ import argparse
|
|
|
3
3
|
import importlib.metadata
|
|
4
4
|
import csv
|
|
5
5
|
from time import time
|
|
6
|
-
colors=['\033[
|
|
7
|
-
MINE='\033[
|
|
8
|
-
FLAG='\033[
|
|
6
|
+
colors=['\033[0m','\033[30m','\033[31m','\033[32m','\033[33m','\033[34m','\033[35m','\033[36m','\033[37m']
|
|
7
|
+
MINE='\033[0m'
|
|
8
|
+
FLAG='\033[0m'
|
|
9
9
|
RESET = '\033[0m'
|
|
10
10
|
|
|
11
11
|
class minesweeper():
|
|
@@ -19,7 +19,7 @@ class minesweeper():
|
|
|
19
19
|
writer.writerow([user,t,size,num,round(score)])
|
|
20
20
|
|
|
21
21
|
def get_score(self,t,size,num):
|
|
22
|
-
ratio=size/num
|
|
22
|
+
ratio=size*2/num
|
|
23
23
|
score=1000/(t*ratio)
|
|
24
24
|
return t,size,num,score
|
|
25
25
|
def colored(self,string):
|
|
@@ -118,7 +118,7 @@ class minesweeper():
|
|
|
118
118
|
def check(self,board):
|
|
119
119
|
if self.check_death(board):
|
|
120
120
|
print('GAME OVER')
|
|
121
|
-
return
|
|
121
|
+
return 2
|
|
122
122
|
elif self.check_success(board):
|
|
123
123
|
print('YOU WIN')
|
|
124
124
|
return 1
|
|
@@ -272,7 +272,7 @@ def get_top(num=5):
|
|
|
272
272
|
'-s','--scores',
|
|
273
273
|
type=int,
|
|
274
274
|
default=5,
|
|
275
|
-
help='
|
|
275
|
+
help='Get top SCORES scores'
|
|
276
276
|
)
|
|
277
277
|
args=p.parse_args()
|
|
278
278
|
if args.scores:
|
|
@@ -285,10 +285,13 @@ def get_top(num=5):
|
|
|
285
285
|
r.sort(key=upper)
|
|
286
286
|
r.reverse()
|
|
287
287
|
for i in range(num):
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
288
|
+
try:
|
|
289
|
+
print(str(i+1)+'. '+r[i][0])
|
|
290
|
+
for j in range(4):
|
|
291
|
+
print(' '+head[j]+': '+ r[i][j+1])
|
|
292
|
+
except:
|
|
293
|
+
pass
|
|
291
294
|
|
|
292
295
|
|
|
293
296
|
# get_top()
|
|
294
|
-
|
|
297
|
+
run()
|
|
@@ -16,7 +16,6 @@
|
|
|
16
16
|
<a href="about.html">about</a>
|
|
17
17
|
<a href="install.html">installation + usage</a>
|
|
18
18
|
<a href="screenshots.html">screenshots</a>
|
|
19
|
-
<a href="changelog.html">changelog</a>
|
|
20
19
|
<a href="play.html" class="active">play</a>
|
|
21
20
|
</nav>
|
|
22
21
|
</div>
|
|
@@ -29,18 +28,15 @@
|
|
|
29
28
|
<div class="embed-card">
|
|
30
29
|
<iframe
|
|
31
30
|
src="https://onecompiler.com/python/456p63wg4"
|
|
32
|
-
title="tmscli on
|
|
33
|
-
loading="lazy"
|
|
34
|
-
allow="clipboard-write"
|
|
35
|
-
referrerpolicy="no-referrer"
|
|
31
|
+
title="tmscli on onecompiler"
|
|
36
32
|
class="embed-frame">
|
|
37
33
|
</iframe>
|
|
38
34
|
</div>
|
|
39
35
|
|
|
40
36
|
<p class="embed-fallback">
|
|
41
37
|
If the embed doesn't load, open it directly:
|
|
42
|
-
<a href="https://onecompiler.com/python/456p63wg4"
|
|
43
|
-
|
|
38
|
+
<a href="https://onecompiler.com/python/456p63wg4">
|
|
39
|
+
https://onecompiler.com/python/456p63wg4
|
|
44
40
|
</a>
|
|
45
41
|
</p>
|
|
46
42
|
</main>
|
|
@@ -16,7 +16,6 @@
|
|
|
16
16
|
<a href="about.html">about</a>
|
|
17
17
|
<a href="install.html">installation + usage</a>
|
|
18
18
|
<a href="screenshots.html" class="active">screenshots</a>
|
|
19
|
-
<a href="changelog.html">changelog</a>
|
|
20
19
|
<a href="play.html">play</a>
|
|
21
20
|
</nav>
|
|
22
21
|
</div>
|
|
@@ -42,13 +41,13 @@
|
|
|
42
41
|
<div class="screenshot-card">
|
|
43
42
|
<h2>Victory</h2>
|
|
44
43
|
<img src="img/win.jpg" alt="Winning a game of tmscli" class="screenshot-img">
|
|
45
|
-
<p>All
|
|
44
|
+
<p>All safe cells uncovered, board is revealed, score is released.</p>
|
|
46
45
|
</div>
|
|
47
46
|
|
|
48
47
|
<div class="screenshot-card">
|
|
49
48
|
<h2>Custom board</h2>
|
|
50
49
|
<img src="img/big.jpg" alt="A custom-sized tmscli board" class="screenshot-img">
|
|
51
|
-
<p>Bigger boards with <code>
|
|
50
|
+
<p>Bigger boards with <code>tms -s 16 -m 15</code> — tmscli is customisable to make it suitable for you.</p>
|
|
52
51
|
</div>
|
|
53
52
|
|
|
54
53
|
</div>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
/* style.css — shared across all pages */
|
|
2
2
|
|
|
3
3
|
* {
|
|
4
4
|
margin: 0;
|
|
@@ -74,7 +74,7 @@ nav a.active {
|
|
|
74
74
|
}
|
|
75
75
|
|
|
76
76
|
|
|
77
|
-
.
|
|
77
|
+
.container {
|
|
78
78
|
max-width: 1100px;
|
|
79
79
|
margin: 2rem auto 3rem;
|
|
80
80
|
padding: 0 2rem;
|
|
@@ -148,7 +148,7 @@ p {
|
|
|
148
148
|
}
|
|
149
149
|
|
|
150
150
|
|
|
151
|
-
.
|
|
151
|
+
.main-text {
|
|
152
152
|
background: #eef6fb;
|
|
153
153
|
padding: 2rem 2rem 1.2rem;
|
|
154
154
|
border-radius: 18px;
|
|
@@ -156,9 +156,11 @@ p {
|
|
|
156
156
|
border-left: 6px solid #2d7a9b;
|
|
157
157
|
}
|
|
158
158
|
|
|
159
|
-
.
|
|
159
|
+
.main-text h2 {
|
|
160
160
|
margin-top: 0;
|
|
161
161
|
}
|
|
162
|
+
|
|
163
|
+
/* about page */
|
|
162
164
|
.about-section {
|
|
163
165
|
background: #ffffff;
|
|
164
166
|
padding: 1.8rem 2rem 1rem;
|
|
@@ -172,6 +174,7 @@ p {
|
|
|
172
174
|
margin-top: 0;
|
|
173
175
|
}
|
|
174
176
|
|
|
177
|
+
/* installation + usage */
|
|
175
178
|
.install-card {
|
|
176
179
|
background: #0f2b3d;
|
|
177
180
|
color: #e2e8f0;
|
|
@@ -236,7 +239,7 @@ pre code {
|
|
|
236
239
|
margin-top: 0.5rem;
|
|
237
240
|
}
|
|
238
241
|
|
|
239
|
-
.
|
|
242
|
+
.foot-note {
|
|
240
243
|
background: #f1f9ff;
|
|
241
244
|
padding: 1.8rem 2rem 1rem;
|
|
242
245
|
border-radius: 18px;
|
|
@@ -250,6 +253,7 @@ pre code {
|
|
|
250
253
|
.dependency-link:hover{
|
|
251
254
|
color:rgb(125,125,150);
|
|
252
255
|
}
|
|
256
|
+
/* footer */
|
|
253
257
|
footer {
|
|
254
258
|
text-align: center;
|
|
255
259
|
padding: 1.8rem 2rem;
|
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
<!-- changelog.html -->
|
|
2
|
-
<!DOCTYPE html>
|
|
3
|
-
<html lang="en">
|
|
4
|
-
<head>
|
|
5
|
-
<meta charset="UTF-8">
|
|
6
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
7
|
-
<title>changelog · tmscli</title>
|
|
8
|
-
<link rel="stylesheet" href="style.css">
|
|
9
|
-
</head>
|
|
10
|
-
<body>
|
|
11
|
-
<header>
|
|
12
|
-
<div class="header-inner">
|
|
13
|
-
<div class="logo">tmscli</div>
|
|
14
|
-
<nav>
|
|
15
|
-
<a href="index.html">main</a>
|
|
16
|
-
<a href="about.html">about</a>
|
|
17
|
-
<a href="install.html">installation + usage</a>
|
|
18
|
-
<a href="screenshots.html">screenshots</a>
|
|
19
|
-
<a href="changelog.html" class="active">changelog</a>
|
|
20
|
-
<a href="play.html">play</a>
|
|
21
|
-
</nav>
|
|
22
|
-
</div>
|
|
23
|
-
</header>
|
|
24
|
-
|
|
25
|
-
<main class="container">
|
|
26
|
-
<h1>changelog</h1>
|
|
27
|
-
<p class="subhead">Every major release of tmscli, newest first. Expand a section to see its minor updates.</p>
|
|
28
|
-
|
|
29
|
-
<!-- ===== v0.3.0 ===== -->
|
|
30
|
-
<div class="changelog-entry">
|
|
31
|
-
<h2>v0.3.0 <span class="version-date">latest</span></h2>
|
|
32
|
-
<ul>
|
|
33
|
-
<li>Added a border to the minesweeper format for easier reading</li>
|
|
34
|
-
<li>Minor bug fixes</li>
|
|
35
|
-
</ul>
|
|
36
|
-
|
|
37
|
-
<details class="patch-dropdown">
|
|
38
|
-
<summary>Show all minor patches</summary>
|
|
39
|
-
<div class="patch-list">
|
|
40
|
-
<div class="patch">
|
|
41
|
-
<h3>v0.3.0</h3>
|
|
42
|
-
<ul>
|
|
43
|
-
<li>Added a border to the minesweeper format for easier reading</li>
|
|
44
|
-
<li>Minor bug fixes</li>
|
|
45
|
-
</ul>
|
|
46
|
-
</div>
|
|
47
|
-
<!-- add v0.3.1, v0.3.2 etc. here -->
|
|
48
|
-
</div>
|
|
49
|
-
</details>
|
|
50
|
-
</div>
|
|
51
|
-
|
|
52
|
-
<!-- ===== v0.2.0 ===== -->
|
|
53
|
-
<div class="changelog-entry">
|
|
54
|
-
<h2>v0.2.0</h2>
|
|
55
|
-
<ul>
|
|
56
|
-
<li>Added customisation options for board size and mine count</li>
|
|
57
|
-
<li>Improved rendering speed in the terminal</li>
|
|
58
|
-
</ul>
|
|
59
|
-
<details class="patch-dropdown">
|
|
60
|
-
<summary>Show all minor patches</summary>
|
|
61
|
-
<div class="patch-list">
|
|
62
|
-
<div class="patch">
|
|
63
|
-
<h3>v0.2.0</h3>
|
|
64
|
-
<ul>
|
|
65
|
-
<li>Added customisation options for board size and mine count</li>
|
|
66
|
-
<li>Improved rendering speed in the terminal</li>
|
|
67
|
-
</ul>
|
|
68
|
-
</div>
|
|
69
|
-
<!-- add v0.2.1, v0.2.2 etc. here -->
|
|
70
|
-
</div>
|
|
71
|
-
</details>
|
|
72
|
-
</div>
|
|
73
|
-
|
|
74
|
-
<!-- ===== v0.1.0 ===== -->
|
|
75
|
-
<div class="changelog-entry">
|
|
76
|
-
<h2>v0.1.0</h2>
|
|
77
|
-
<ul>
|
|
78
|
-
<li>Initial release</li>
|
|
79
|
-
<li>Basic Minesweeper gameplay in the terminal</li>
|
|
80
|
-
<li>Basic commands and original 9x9 grid</li>
|
|
81
|
-
</ul>
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
<details class="patch-dropdown">
|
|
85
|
-
<summary>Show all minor patches</summary>
|
|
86
|
-
<div class="patch-list">
|
|
87
|
-
<div class="patch">
|
|
88
|
-
<h3>v0.1.0</h3>
|
|
89
|
-
<ul>
|
|
90
|
-
<li>Initial release</li>
|
|
91
|
-
<li>Basic Minesweeper gameplay in the terminal</li>
|
|
92
|
-
<li>Basic commands and original 9x9 grid</li>
|
|
93
|
-
</ul>
|
|
94
|
-
</div>
|
|
95
|
-
<!-- add v0.1.1, v0.1.2 etc. here -->
|
|
96
|
-
</div>
|
|
97
|
-
</details>
|
|
98
|
-
</div>
|
|
99
|
-
|
|
100
|
-
<div class="lorem-note">
|
|
101
|
-
<h2>Stay updated</h2>
|
|
102
|
-
<p>To upgrade to the latest version:</p>
|
|
103
|
-
<pre><code>pip install --upgrade tmscli</code></pre>
|
|
104
|
-
</div>
|
|
105
|
-
</main>
|
|
106
|
-
|
|
107
|
-
<footer>
|
|
108
|
-
<p>tmscli · PyPI module · terminal minesweeper</p>
|
|
109
|
-
</footer>
|
|
110
|
-
</body>
|
|
111
|
-
</html>
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|