tmscli 0.2.6__tar.gz → 0.2.8__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.2.6
3
+ Version: 0.2.8
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.2.6"
7
+ version = "0.2.8"
8
8
  description = "runs minesweeper in your terminal, type rules for how to play"
9
9
  dependencies = []
10
10
 
@@ -6,11 +6,12 @@ class minesweeper():
6
6
  self.num=num
7
7
  ['uncovered?','flagged?','display']
8
8
  def print_board(self,board):
9
-
10
- top=' 1 2 3 4 5 6 7 8 9'
11
- print(top)
9
+ top=(len(str(self.size))+2)*' '
10
+ for i in range(self.size):
11
+ top+=str(i+1)+' '
12
+ print(top[:-1])
12
13
  for i in range(self.size):
13
- if i==10:
14
+ if 100>i>9:
14
15
  buffer=str(i+1)+' '
15
16
  else:
16
17
  buffer=str(i+1)+' '
@@ -103,7 +104,7 @@ class minesweeper():
103
104
 
104
105
  return board
105
106
 
106
- terminal_minesweeper=minesweeper(9,10)
107
+ terminal_minesweeper=minesweeper(9,5)
107
108
  # terminal_minesweeper.print_board(board)
108
109
  def main_loop(board):
109
110
  while True:
@@ -139,9 +140,25 @@ def run():
139
140
  action='store_true',
140
141
  help='gives rules'
141
142
  )
143
+ p.add_argument(
144
+ '-s','--size',
145
+ type=int,
146
+ default=9,
147
+ help='set size to x'
148
+ )
149
+ p.add_argument(
150
+ '-m','--mine_num'
151
+ type=int
152
+ default=5,
153
+ help='set number of mines to x'
154
+ )
142
155
  args=p.parse_args()
143
156
  if args.rules:
144
157
  print_rules()
158
+ if args.size:
159
+ terminal_minesweeper.size=args.size
160
+ if args.mine_num:
161
+ terminal_minesweeper.num=args.mine_num
145
162
  mines=terminal_minesweeper.get_mines()
146
163
  board=terminal_minesweeper.create_starting_board(mines)
147
164
  main_loop(board)
@@ -164,4 +181,5 @@ Aim:
164
181
  uncover every square without a mine on it
165
182
 
166
183
  If you step on a mine you lose, the number on the square is how many mines are around it (3 x 3 radius)
167
- ''')
184
+ ''')
185
+ run()
tmscli-0.2.8/update.sh ADDED
@@ -0,0 +1,19 @@
1
+ #!/bin/bash
2
+
3
+ # 1. Start all three processes in the background simultaneously
4
+ echo "Starting tasks in parallel..."
5
+
6
+ hatch build &
7
+ PID_BUILD=$!
8
+
9
+ hatch publish &
10
+ PID_PASS=$!
11
+
12
+ # Replace 'pip install --upgrade ...' with your actual upgrade command if different
13
+ pip list --outdated --format=json | jq -r '.[] | .name' | xargs -n1 pip install -U &
14
+ PID_PUBLISH=$!
15
+
16
+ # 2. Wait for all background processes to complete
17
+ wait $PID_BUILD $PID_PUBLISH $PID_UPGRADE
18
+
19
+ echo "All tasks finished!"
File without changes
File without changes