tmscli 0.3.4__tar.gz → 0.3.6__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.
@@ -1,4 +1,4 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: tmscli
3
- Version: 0.3.4
3
+ Version: 0.3.6
4
4
  Summary: runs minesweeper in your terminal, type rules for how to play
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "tmscli"
7
- version = "0.3.4"
7
+ version = "0.3.6"
8
8
  description = "runs minesweeper in your terminal, type rules for how to play"
9
9
  dependencies = []
10
10
 
@@ -0,0 +1,49 @@
1
+ <!-- about.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>about · 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">changelog</a>
20
+ </nav>
21
+ </div>
22
+ </header>
23
+
24
+ <main class="container">
25
+ <h1>about tmscli</h1>
26
+ <p class="subhead">A terminal Minesweeper, customisable to make it suitable for you.</p>
27
+
28
+ <div class="about-section">
29
+ <h2>What is tmscli?</h2>
30
+ <p>tmscli is a Python module that brings Minesweeper into your terminal. It's lightweight, fast, and built for those moments when you're bored but still want to stay in the command line.</p>
31
+ </div>
32
+
33
+ <div class="about-section">
34
+ <h2>Why it exists</h2>
35
+ <p>Bored of sitting there, with all your work done, but unable to do anything?</p>
36
+ <p>tmscli brings in minesweeper to the terminal and is customisable to make it suitable for you.</p>
37
+ </div>
38
+
39
+ <div class="about-section">
40
+ <h2>Customisation</h2>
41
+ <p>tmscli lets you adjust the game to your liking — board size, difficulty, and display format. The v0.3.0 release added a border to the minesweeper format along with minor bug fixes.</p>
42
+ </div>
43
+ </main>
44
+
45
+ <footer>
46
+ <p>tmscli · PyPI module · terminal minesweeper</p>
47
+ </footer>
48
+ </body>
49
+ </html>
@@ -0,0 +1,112 @@
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
+ </nav>
21
+ </div>
22
+ </header>
23
+
24
+ <main class="container">
25
+ <h1>changelog</h1>
26
+ <p class="subhead">Every major release of tmscli, newest first. Expand a section to see its minor updates.</p>
27
+
28
+ <!-- ===== v0.3.0 ===== -->
29
+ <div class="changelog-entry">
30
+ <h2>v0.3.0 <span class="version-date">latest</span></h2>
31
+ <ul>
32
+ <li>Added a border to the minesweeper format for easier reading</li>
33
+ <li>Minor bug fixes</li>
34
+ </ul>
35
+
36
+ <details class="patch-dropdown">
37
+ <summary>Show all minor patches</summary>
38
+ <div class="patch-list">
39
+ <div class="patch">
40
+ <h3>v0.3.0</h3>
41
+ <ul>
42
+ <li>Added a border to the minesweeper format for easier reading</li>
43
+ <li>Minor bug fixes</li>
44
+ </ul>
45
+ </div>
46
+ <!-- add v0.3.1, v0.3.2 etc. here -->
47
+ </div>
48
+ </details>
49
+ </div>
50
+
51
+ <!-- ===== v0.2.0 ===== -->
52
+ <div class="changelog-entry">
53
+ <h2>v0.2.0</h2>
54
+ <ul>
55
+ <li>Added customisation options for board size and mine count</li>
56
+ <li>Improved rendering speed in the terminal</li>
57
+ </ul>
58
+ <p class="muted">(Placeholder entry — replace with real notes when ready.)</p>
59
+
60
+ <details class="patch-dropdown">
61
+ <summary>Show all minor patches</summary>
62
+ <div class="patch-list">
63
+ <div class="patch">
64
+ <h3>v0.2.0</h3>
65
+ <ul>
66
+ <li>Added customisation options for board size and mine count</li>
67
+ <li>Improved rendering speed in the terminal</li>
68
+ </ul>
69
+ </div>
70
+ <!-- add v0.2.1, v0.2.2 etc. here -->
71
+ </div>
72
+ </details>
73
+ </div>
74
+
75
+ <!-- ===== v0.1.0 ===== -->
76
+ <div class="changelog-entry">
77
+ <h2>v0.1.0</h2>
78
+ <ul>
79
+ <li>Initial release</li>
80
+ <li>Basic Minesweeper gameplay in the terminal</li>
81
+ <li>Arrow keys to move, space to reveal, <code>f</code> to flag</li>
82
+ </ul>
83
+ <p class="muted">(Placeholder entry — replace with real notes when ready.)</p>
84
+
85
+ <details class="patch-dropdown">
86
+ <summary>Show all minor patches</summary>
87
+ <div class="patch-list">
88
+ <div class="patch">
89
+ <h3>v0.1.0</h3>
90
+ <ul>
91
+ <li>Initial release</li>
92
+ <li>Basic Minesweeper gameplay in the terminal</li>
93
+ <li>Arrow keys to move, space to reveal, <code>f</code> to flag</li>
94
+ </ul>
95
+ </div>
96
+ <!-- add v0.1.1, v0.1.2 etc. here -->
97
+ </div>
98
+ </details>
99
+ </div>
100
+
101
+ <div class="lorem-note">
102
+ <h2>Stay updated</h2>
103
+ <p>To upgrade to the latest version:</p>
104
+ <pre><code>pip install --upgrade tmscli</code></pre>
105
+ </div>
106
+ </main>
107
+
108
+ <footer>
109
+ <p>tmscli · PyPI module · terminal minesweeper</p>
110
+ </footer>
111
+ </body>
112
+ </html>
Binary file
Binary file
Binary file
@@ -1,22 +1,23 @@
1
+ <!-- index.html (main) -->
1
2
  <!DOCTYPE html>
2
3
  <html lang="en">
3
4
  <head>
4
5
  <meta charset="UTF-8">
5
6
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
- <title>tmscli · PyPI module</title>
7
-
7
+ <title>tmscli · Minesweeper in your terminal</title>
8
8
  <link rel="stylesheet" href="style.css">
9
9
  </head>
10
10
  <body>
11
11
  <header>
12
12
  <div class="header-inner">
13
13
  <div class="logo">tmscli</div>
14
- <nav>
15
- <a href="index.html" class="active">main</a>
16
- <a href="about.html">about</a>
17
- <a href="install.html">installation + usage</a>
18
- </nav>
19
- </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">changelog</a>
20
+ </nav>
20
21
  </header>
21
22
 
22
23
  <main class="container">
@@ -26,26 +27,23 @@
26
27
  <div class="card-grid">
27
28
  <div class="card">
28
29
  <h2>Quick start</h2>
29
- <p>Visit the install page for installation, and see about for info</p>
30
- <p></p>
30
+ <p>Visit the <a href="install.html">install page</a> for installation, and see <a href="about.html">about</a> for info.</p>
31
31
  </div>
32
32
  <div class="card">
33
33
  <h2>Why tmscli?</h2>
34
34
  <p>Bored of sitting there, with all your work done, but unable to do anything?</p>
35
- <p>tmscli brings in minesweeper to the terminal and is customisable to make it suitable for you</p>
35
+ <p>tmscli brings in minesweeper to the terminal and is customisable to make it suitable for you.</p>
36
36
  </div>
37
37
  </div>
38
38
 
39
39
  <div class="lorem-block">
40
40
  <h2>Latest updates</h2>
41
- <p>v0.3.0 added border to the minesweeper format and minor bug fixes</p>
41
+ <p><strong>v0.3.0</strong> added border to the minesweeper format and minor bug fixes.</p>
42
42
  </div>
43
43
  </main>
44
44
 
45
45
  <footer>
46
- <p>tmscli · PyPI module</p>
46
+ <p>tmscli · PyPI module · terminal minesweeper</p>
47
47
  </footer>
48
-
49
-
50
48
  </body>
51
49
  </html>
@@ -0,0 +1,62 @@
1
+ <!-- install.html (installation + usage) -->
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>installation + usage · 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" class="active">installation + usage</a>
18
+ <a href="screenshots.html">screenshots</a>
19
+ <a href="changelog.html">changelog</a>
20
+ </nav>
21
+ </div>
22
+ </header>
23
+
24
+ <main class="container">
25
+ <h1>installation &amp; usage</h1>
26
+ <p class="subhead">Get tmscli running in your terminal in seconds.</p>
27
+
28
+ <div class="install-card">
29
+ <h2>Install from PyPI</h2>
30
+ <pre><code>pip install tmscli</code></pre>
31
+ <p>Once installed, the <code>tmscli</code> command becomes available in your terminal.</p>
32
+ </div>
33
+
34
+ <div class="usage-section">
35
+ <h2>Basic usage</h2>
36
+
37
+ <h3>1. Start the game</h3>
38
+ <pre><code>tmscli</code></pre>
39
+ <p>Launches Minesweeper directly in your terminal with the default board.</p>
40
+
41
+ <h3>2. Set the board size</h3>
42
+ <pre><code>tmscli --size 10</code></pre>
43
+ <p>Or use the short form:</p>
44
+ <pre><code>tmscli -s 10</code></pre>
45
+ <p>Adjust the board size to set your own difficulty.</p>
46
+
47
+ <h3>3. Controls</h3>
48
+ <p>Use the arrow keys to move, space to reveal, and <code>f</code> to flag a cell. (Exact keys may vary — check the in‑game help.)</p>
49
+ </div>
50
+
51
+ <div class="lorem-note">
52
+ <h2>Version note</h2>
53
+ <p>v0.3.0 added a border to the minesweeper format and minor bug fixes. Update with:</p>
54
+ <pre><code>pip install --upgrade tmscli</code></pre>
55
+ </div>
56
+ </main>
57
+
58
+ <footer>
59
+ <p>tmscli · PyPI module · terminal minesweeper</p>
60
+ </footer>
61
+ </body>
62
+ </html>
@@ -129,7 +129,7 @@ def main_loop(board):
129
129
  else:
130
130
  print('already uncovered')
131
131
  elif cmds[0]=='fl':
132
- if not board[int(cmds[1])-1][int(cmds[2])-1][1]:
132
+ if not board[int(cmds[1])-1][int(cmds[2])-1][1] and not board[int(cmds[1])-1][int(cmds[2])-1][0]:
133
133
  board[int(cmds[1])-1][int(cmds[2])-1][1]=True
134
134
  else:
135
135
  print('already flagged')
@@ -0,0 +1,67 @@
1
+ <!-- screenshots.html — content placeholder, ready for your captures -->
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>screenshots · 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" class="active">screenshots</a>
19
+ <a href="changelog.html">changelog</a>
20
+ </nav>
21
+ </div>
22
+ </header>
23
+
24
+ <main class="container">
25
+ <h1>screenshots</h1>
26
+ <p class="subhead">See tmscli in action — straight from the terminal.</p>
27
+
28
+ <!--
29
+ Add your screenshots below.
30
+ Each .screenshot-card is one entry. Duplicate the block as needed.
31
+ Replace the <img> src with your actual image path, e.g. "img/fresh-board.png"
32
+ -->
33
+
34
+ <div class="screenshot-grid">
35
+
36
+ <div class="screenshot-card">
37
+ <h2>Fresh board</h2>
38
+ <img src="img/new_board.jpg" alt="A fresh tmscli board" class="screenshot-img">
39
+ <p>A new game, waiting for your first move.</p>
40
+ </div>
41
+
42
+ <div class="screenshot-card">
43
+ <h2>Mid-game</h2>
44
+ <img src="img/midgame.jpg" alt="Mid-game in tmscli" class="screenshot-img">
45
+ <p>Numbers revealed, flags placed.</p>
46
+ </div>
47
+
48
+ <div class="screenshot-card">
49
+ <h2>Victory</h2>
50
+ <img src="img/win.jpg" alt="Winning a game of tmscli" class="screenshot-img">
51
+ <p>All mines flagged, all safe cells revealed.</p>
52
+ </div>
53
+
54
+ <div class="screenshot-card">
55
+ <h2>Custom board</h2>
56
+ <img src="img/big.jpg" alt="A custom-sized tmscli board" class="screenshot-img">
57
+ <p>Bigger boards with <code>tmscli -s 16</code> — tmscli is customisable to make it suitable for you.</p>
58
+ </div>
59
+
60
+ </div>
61
+ </main>
62
+
63
+ <footer>
64
+ <p>tmscli · PyPI module · terminal minesweeper</p>
65
+ </footer>
66
+ </body>
67
+ </html>
@@ -308,4 +308,67 @@ footer {
308
308
  padding: 0.8rem 1rem;
309
309
  font-size: 0.85rem;
310
310
  }
311
+ }
312
+ .changelog-entry {
313
+ background: #ffffff;
314
+ padding: 1.8rem 2rem 1.2rem;
315
+ border-radius: 18px;
316
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
317
+ border: 1px solid #e1eef5;
318
+ border-left: 6px solid #2d7a9b;
319
+ margin-bottom: 1.8rem;
320
+ }
321
+
322
+ .changelog-entry h2 {
323
+ margin-top: 0;
324
+ font-size: 1.5rem;
325
+ display: flex;
326
+ align-items: center;
327
+ gap: 0.8rem;
328
+ }
329
+
330
+ .version-date {
331
+ font-size: 0.8rem;
332
+ font-weight: 500;
333
+ text-transform: uppercase;
334
+ letter-spacing: 0.05em;
335
+ background: #2d7a9b;
336
+ color: #ffffff;
337
+ padding: 0.2rem 0.7rem;
338
+ border-radius: 999px;
339
+ }
340
+
341
+ .changelog-entry ul {
342
+ margin: 0.5rem 0 0 1.2rem;
343
+ padding: 0;
344
+ }
345
+
346
+ .changelog-entry li {
347
+ margin-bottom: 0.5rem;
348
+ color: #1e2f3f;
349
+ }
350
+
351
+ .muted {
352
+ color: #7a94a5;
353
+ font-size: 0.9rem;
354
+ font-style: italic;
355
+ margin-top: 0.8rem;
356
+ }
357
+
358
+ /* responsive for new pages */
359
+ @media (max-width: 700px) {
360
+ .screenshot-grid {
361
+ grid-template-columns: 1fr;
362
+ gap: 1.2rem;
363
+ }
364
+
365
+ .screenshot-card,
366
+ .changelog-entry {
367
+ padding: 1.5rem 1.2rem 0.8rem;
368
+ }
369
+
370
+ .screenshot-card pre {
371
+ font-size: 0.7rem;
372
+ padding: 0.8rem;
373
+ }
311
374
  }
@@ -1,76 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="UTF-8">
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
- <title>about · tmscli</title>
7
- <link rel="stylesheet" href="style.css">
8
- </head>
9
- <body>
10
- <header>
11
- <div class="header-inner">
12
- <div class="logo">tmscli</div>
13
- <nav>
14
- <a href="index.html">main</a>
15
- <a href="about.html" class="active">about</a>
16
- <a href="install.html">installation + usage</a>
17
- </nav>
18
- </div>
19
- </header>
20
-
21
- <main class="container">
22
- <h1>about tmscli</h1>
23
- <p class="subhead">A fun little project from 2024 to see who could code faster</p>
24
-
25
- <div class="about-section">
26
- <h2>Philosophy</h2>
27
- <p>tmscli started as a fun competition to see whether python or C++ could make minesweeper faster and run smoother, now the python version has been uploaded to PyPi and can be downloaded using pip.</p>
28
- <p>It is inteded to engage people into what coding can get you and should not be used to personal advantage (not sure how, but it's a must say)</p>
29
- </div>
30
-
31
- <div class="about-section">
32
- <h2>Behind the scenes</h2>
33
- <p>tmscli is fully python and relies on random to build the minefield</p>
34
- <p>lets take a look at some code</p>
35
- <pre><code> while True:
36
- terminal_minesweeper.print_board(board)
37
- cmd=input()
38
- cmds=cmd.split()
39
- if int(cmds[1])>terminal_minesweeper.size or int(cmds[1])<0 or int(cmds[2])>terminal_minesweeper.size or int(cmds[2])<0:
40
- print('coordinate out of range, please try again')
41
- if cmds[0]=='uc':
42
- if (not board[int(cmds[1])-1][int(cmds[2])-1][0]) and (not board[int(cmds[1])-1][int(cmds[2])-1][1]):
43
- board[int(cmds[1])-1][int(cmds[2])-1][0]=True
44
- if board[int(cmds[1])-1][int(cmds[2])-1][2]==0:
45
- board=terminal_minesweeper.richochet(board,(int(cmds[1])-1,int(cmds[2])-1))
46
- else:
47
- print('already uncovered')
48
- elif cmds[0]=='fl':
49
- if not board[int(cmds[1])-1][int(cmds[2])-1][1]:
50
- board[int(cmds[1])-1][int(cmds[2])-1][1]=True
51
- else:
52
- print('already flagged')
53
- elif cmds[0]=='uf':
54
- if board[int(cmds[1])-1][int(cmds[2])-1][2]:
55
- board[int(cmds[1])-1][int(cmds[2])-1][0]=False
56
- else:
57
- print('already not flagged')
58
- else:
59
- print('unrecognised command, please try again')
60
- terminal_minesweeper.check(board)</code></pre>
61
- <p>This is a rather large chunk of code, and is what the main loop does</p>
62
- <p>as you can see it has three commands, uc, fl, and uf. Each doing something different. If it does not think the input is valid, it will output what it thinks the error is. (May be inaccurate)</p>
63
- </div>
64
-
65
- <div class="about-section">
66
- <h2>Github Repository</h2>
67
- <p>tmscli is 100% owned by a-humanly-human.</p>
68
- <p>Link to Repository: <a href="https://github.com/a-humanly-human/terminal-minesweeper/">https://github.com/a-humanly-human/terminal-minesweeper/</a></p>
69
- </div>
70
- </main>
71
-
72
- <footer>
73
- <p>tmscli · PyPI module</p>
74
- </footer>
75
- </body>
76
- </html>
@@ -1,88 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="UTF-8">
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
- <title>installation + usage · tmscli</title>
7
- <link rel="stylesheet" href="style.css">
8
- </head>
9
- <body>
10
- <header>
11
- <div class="header-inner">
12
- <div class="logo">tmscli</div>
13
- <nav>
14
- <a href="index.html">main</a>
15
- <a href="about.html">about</a>
16
- <a href="install.html" class="active">installation + usage</a>
17
- </nav>
18
- </div>
19
- </header>
20
-
21
- <main class="container">
22
- <h1>installation &amp; usage</h1>
23
- <p class="subhead">A guide on how to install tmscli from pypi to how to customise number of mines and the size of the board.</p>
24
- <h2>Dependencies</h2>
25
- <div class="install-card">
26
-
27
- <h2>Install Python</h2>
28
- <a href="https://www.python.org/getit/windows/" class="dependency-link">https://www.python.org/getit/windows/</a>
29
- </div>
30
- <div class="install-card">
31
- <h2>Check for Pip</h2>
32
- <h3>first check</h3>
33
- <pre><code>pip --version</code></pre>
34
- <p>If a version shows up, precede to <a href="#installation-PyPi" class="dependency-link">Install from PyPi</a></p>
35
- <br>
36
- <p>If "Not Recognized" appears, follow the pip installation</p>
37
- <h3>Installing pip</h3>
38
- <pre><code>python -m ensurepip --upgrade</code></pre>
39
- <p>then repeat the previous command (pip --version) to check for success</p>
40
-
41
- </div>
42
- <div class="install-card" id="installation-PyPi">
43
- <h2>Install from PyPI</h2>
44
- <pre><code>pip install tmscli</code></pre>
45
- </div>
46
-
47
- <div class="usage-section">
48
- <h2>Basic usage</h2>
49
- <pre><code>tms</code></pre>
50
- <p>Launches the basic 9x9 board with 10 mines</p>
51
-
52
- <h2>Size</h2>
53
- <pre><code>tms -s SIZE</code></pre>
54
- <p>customises the boards size</p>
55
-
56
- <h2>Number of mines</h2>
57
- <pre><code>tms -m NUM</code></pre>
58
- <p>customises number of mines</p>
59
-
60
- <h2>Rules</h2>
61
- <pre><code>tms -r</code></pre>
62
- <p>prints the rules</p>
63
- <h2>In-game commands</h2>
64
- <pre><code>uc x y</code></pre>
65
- <p>uncovers square (x,y)</p>
66
- <pre><code>fl x y</code></pre>
67
- <p>flags square (x,y)</p>
68
- <pre><code>uf x y</code></pre>
69
- <p>unflags square (x,y)</p>
70
- <p>Note:</p>
71
- <pre><code>
72
- y----&gt;
73
- x
74
- |
75
- |
76
- |
77
- V
78
- </code></pre>
79
- <p>use <pre><code>tms -r</code></pre> for a full guide</p>
80
-
81
- </div>
82
-
83
-
84
- <footer>
85
- <p>tmscli · PyPI module</p>
86
- </footer>
87
- </body>
88
- </html>
File without changes
File without changes
File without changes
File without changes