tmscli 0.2.9__tar.gz → 0.3.0__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.9
3
+ Version: 0.3.0
4
4
  Summary: runs minesweeper in your terminal, type rules for how to play
@@ -4,11 +4,9 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "tmscli"
7
- version = "0.2.9"
7
+ version = "0.3.0"
8
8
  description = "runs minesweeper in your terminal, type rules for how to play"
9
9
  dependencies = []
10
10
 
11
11
  [project.scripts]
12
12
  tms = "tmscli.main:run"
13
- rules = "tmscli.main:print_rules"
14
-
@@ -6,15 +6,10 @@ class minesweeper():
6
6
  self.num=num
7
7
  ['uncovered?','flagged?','display']
8
8
  def print_board(self,board):
9
- top=(len(str(self.size))+2)*' '
9
+ top=' '+(self.size*2)*'_'
10
+ print(top)
10
11
  for i in range(self.size):
11
- top+=str(i+1)+' '
12
- print(top[:-1])
13
- for i in range(self.size):
14
- if 100>i>9:
15
- buffer=str(i+1)+' '
16
- else:
17
- buffer=str(i+1)+' '
12
+ buffer='| '
18
13
  for j in board[i]:
19
14
  if j[0]==True:
20
15
  buffer+=str(j[2])+' '
@@ -22,7 +17,9 @@ class minesweeper():
22
17
  buffer+='F'+' '
23
18
  else:
24
19
  buffer+=' '+' '
25
- print(buffer[:-1])
20
+ print(buffer[:-1]+'|')
21
+ bottom=' '+(len(top)-1)*'-'
22
+ print(bottom)
26
23
  def get_mines(self):
27
24
  mines=[]
28
25
  while len(mines)<self.num:
@@ -182,4 +179,3 @@ uncover every square without a mine on it
182
179
 
183
180
  If you step on a mine you lose, the number on the square is how many mines are around it (3 x 3 radius)
184
181
  ''')
185
- run()
File without changes
File without changes
File without changes