more compact string generation
This commit is contained in:
parent
8e10466781
commit
6f39895722
21
minebash
21
minebash
@ -92,15 +92,18 @@ tailline = '└'
|
||||
def setup_strings(colcount):
|
||||
#setup lines to print at the end and start of the matrix, aswell as between rows
|
||||
global headline, midline, tailline
|
||||
for i in range(colcount):
|
||||
if i == width-1:
|
||||
headline += '───┐'
|
||||
midline += '───┤'
|
||||
tailline += '───┘'
|
||||
else:
|
||||
headline += '───┬'
|
||||
midline += '───┼'
|
||||
tailline += '───┴'
|
||||
headline = '┌' + "".join('───┬' for i in range(width-1)) + '───┐'
|
||||
midline = '├' + ''.join('───┼' for i in range(width-1)) + '───┤'
|
||||
tailline = '└' + ''.join('───┴' for i in range(width-1)) + '───┘'
|
||||
#for i in range(colcount):
|
||||
#if i == width-1:
|
||||
#headline += '───┐'
|
||||
#midline += '───┤'
|
||||
#tailline += '───┘'
|
||||
#else:
|
||||
#headline += '───┬'
|
||||
#midline += '───┼'
|
||||
#tailline += '───┴'
|
||||
|
||||
def endgame(msg=''):
|
||||
if msg != '':
|
||||
|
Loading…
Reference in New Issue
Block a user