mirror of
https://gitlab.com/oloturia/damastodon.git
synced 2025-01-07 22:17:15 +01:00
alignment not good
This commit is contained in:
parent
14eb5e9d19
commit
d7a77b73c9
2 changed files with 3 additions and 5 deletions
|
@ -7,7 +7,6 @@ import pickle
|
||||||
import random
|
import random
|
||||||
import os
|
import os
|
||||||
import time
|
import time
|
||||||
import re
|
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
api_url = sys.argv[1]
|
api_url = sys.argv[1]
|
||||||
|
@ -62,7 +61,7 @@ def check_message(notification):
|
||||||
pickle.dump("@"+challenger,f)
|
pickle.dump("@"+challenger,f)
|
||||||
pickle.dump(False,f)
|
pickle.dump(False,f)
|
||||||
pickle.dump(board,f)
|
pickle.dump(board,f)
|
||||||
mastodon.status_post("◾: @"+account+" ◽: @"+challenger+" turn ◽\n"+dama.draw_checkerboard(board,space="🟥 ",white_norm="◽ ",white_knight="⚪ ",black_norm="◾ ",black_knight="⚫ ",empty="🟦 ",frstrow="0🇦 🇧 🇨 🇩 🇪 🇫 🇬 🇭 \n"),visibility="direct")
|
mastodon.status_post("◾: @"+account+" ◽: @"+challenger+" turn ◽\n"+dama.draw_checkerboard(board,space="🟥",white_norm="◽",white_knight="⚪",black_norm="◾",black_knight="⚫",empty="🟦",frstrow="0 🇦 🇧 🇨 🇩 🇪 🇫 🇬 🇭 \n"),visibility="direct")
|
||||||
return
|
return
|
||||||
elif content.split(" ")[1].lower() == "no":
|
elif content.split(" ")[1].lower() == "no":
|
||||||
os.remove(save_position+content.split(" ")[0][1:])
|
os.remove(save_position+content.split(" ")[0][1:])
|
||||||
|
|
|
@ -2,12 +2,11 @@
|
||||||
|
|
||||||
import re
|
import re
|
||||||
|
|
||||||
def draw_checkerboard(status,space="▒",white_norm="h",white_knight="H",black_norm="b",black_knight="B",empty=" ",frstrow=" abcdefgh\n"):
|
def draw_checkerboard(status,space="▒",white_norm="h",white_knight="H",black_norm="b",black_knight="B",empty=" ",frstrow=" abcdefgh\n",column="12345678"):
|
||||||
bstr = ""
|
bstr = ""
|
||||||
bstr += frstrow
|
bstr += frstrow
|
||||||
for row in range(0,len(status)):
|
for row in range(0,len(status)):
|
||||||
bstr += str(row+1)+""
|
bstr += column[row]
|
||||||
|
|
||||||
if row % 2 == 0:
|
if row % 2 == 0:
|
||||||
bstr += space
|
bstr += space
|
||||||
for cell in range(0,int(len(status)/2)):
|
for cell in range(0,int(len(status)/2)):
|
||||||
|
|
Loading…
Reference in a new issue