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):
|
def setup_strings(colcount):
|
||||||
#setup lines to print at the end and start of the matrix, aswell as between rows
|
#setup lines to print at the end and start of the matrix, aswell as between rows
|
||||||
global headline, midline, tailline
|
global headline, midline, tailline
|
||||||
for i in range(colcount):
|
headline = '┌' + "".join('───┬' for i in range(width-1)) + '───┐'
|
||||||
if i == width-1:
|
midline = '├' + ''.join('───┼' for i in range(width-1)) + '───┤'
|
||||||
headline += '───┐'
|
tailline = '└' + ''.join('───┴' for i in range(width-1)) + '───┘'
|
||||||
midline += '───┤'
|
#for i in range(colcount):
|
||||||
tailline += '───┘'
|
#if i == width-1:
|
||||||
else:
|
#headline += '───┐'
|
||||||
headline += '───┬'
|
#midline += '───┤'
|
||||||
midline += '───┼'
|
#tailline += '───┘'
|
||||||
tailline += '───┴'
|
#else:
|
||||||
|
#headline += '───┬'
|
||||||
|
#midline += '───┼'
|
||||||
|
#tailline += '───┴'
|
||||||
|
|
||||||
def endgame(msg=''):
|
def endgame(msg=''):
|
||||||
if msg != '':
|
if msg != '':
|
||||||
|
Loading…
Reference in New Issue
Block a user