innitial Chess commit
This commit is contained in:
33
chess/output.py
Normal file
33
chess/output.py
Normal file
@@ -0,0 +1,33 @@
|
||||
width = 4
|
||||
|
||||
TOP_L, TOP_F, TOP_R = "\u2598", "\u2580", "\u259D"
|
||||
MID_L, MID_F, MID_R = "\u258C", "\u2588", "\u2590"
|
||||
BOT_L, BOT_F, BOT_R = "\u2596", "\u2584", "\u2597"
|
||||
|
||||
print(TOP_L, TOP_F, TOP_R)
|
||||
print(MID_L, MID_F, MID_R)
|
||||
print(BOT_L, BOT_F, BOT_R)
|
||||
|
||||
BL_TR, TL_BR = "\u259E", "\u259A"
|
||||
|
||||
|
||||
print((BOT_R + BOT_F * width + BOT_L + " " * (2+width))*4) # Top Row
|
||||
for row in range(8):
|
||||
line1 = ""
|
||||
line2 = ""
|
||||
line3 = ""
|
||||
for i in range(2):
|
||||
for col in range(8):
|
||||
if i == 0: # inner row
|
||||
if (row + col) % 2 == 0:
|
||||
line2 += MID_R + MID_F * width + MID_L
|
||||
else:
|
||||
line2 += " " * (width + 2)
|
||||
elif i == 1: # outer row
|
||||
if (row + col) % 2 == 0:
|
||||
line1 +=BOT_R + BOT_F * width + BOT_L
|
||||
else:
|
||||
line1 += " " * (width + 2)
|
||||
# print(line1)
|
||||
# print(line2)
|
||||
# print(line3)
|
||||
Reference in New Issue
Block a user