Files
landingpage/chess/chess_64.py
2026-02-06 13:23:45 +01:00

35 lines
1.2 KiB
Python

type_to_name = []
PIECE_TO_UNICODE = {
"wk": "\u2654 ", "wq": "\u2655 ", "wr": "\u2656 ", "wb": "\u2657 ", "wn": "\u2658 ", "wp": "\u2659 ",
"bk": "\u265A ", "bq": "\u265B ", "br": "\u265C ", "bb": "\u265D ", "bn": "\u265E ", "bp": "\u265F "
}
NOT_A_FILE = 0xfefefefefefefefe
NOT_H_FILE = 0x7f7f7f7f7f7f7f7f
INDEX_TO_FIELD = [
"a1", "b1", "c1", "d1", "e1", "f1", "g1", "h1",
"a2", "b2", "c2", "d2", "e2", "f2", "g2", "h2",
"a3", "b3", "c3", "d3", "e3", "f3", "g3", "h3",
"a4", "b4", "c4", "d4", "e4", "f4", "g4", "h4",
"a5", "b5", "c5", "d5", "e5", "f5", "g5", "h5",
"a6", "b6", "c6", "d6", "e6", "f6", "g6", "h6",
"a7", "b7", "c7", "d7", "e7", "f7", "g7", "h7",
"a8", "b8", "c8", "d8", "e8", "f8", "g8", "h8",
]
''' Board Index:
a b c d e f g h
8 [56] [57] [58] [59] [60] [61] [62] [63]
7 [48] [49] [50] [51] [52] [53] [54] [55]
6 [40] [41] [42] [43] [44] [45] [46] [47]
5 [32] [33] [34] [35] [36] [37] [38] [39]
4 [24] [25] [26] [27] [28] [29] [30] [31]
3 [16] [17] [18] [19] [20] [21] [22] [23]
2 [08] [09] [10] [11] [12] [13] [14] [15]
1 [00] [01] [02] [03] [03] [05] [06] [07]
'''