Added position-numbers to the board

This commit is contained in:
Alexander Munch-Hansen 2018-02-08 00:00:18 +01:00
parent fffc8cda85
commit 0d489922cf

View File

@ -100,12 +100,14 @@ class Board:
temp.append("{}".format(x)) temp.append("{}".format(x))
return """ return """
+--------------------------------------------------------------+ 13 14 15 16 17 18 19 20 21 22 23 24
|{13}|{14}|{15}|{16}|{17}|{18}| bar -1: {27} |{19}|{20}|{21}|{22}|{23}|{24}| home 1: {25} | --------------------------------------------------------------------------
|--|--|--|--|--|--|------------|--|--|--|--|--|--| | | {12}| {11}| {10}| {9}| {8}| {7}| bar 1: {26} | {6}| {5}| {4}| {3}| {2}| {1}| end -1: {0}|
|{12}|{11}|{10}|{9}|{8}|{7}| bar 1: {26} |{6}|{5}|{4}|{3}|{2}|{1}| home -1: {0} | |---|---|---|---|---|---|-----------|---|---|---|---|---|---|
+--------------------------------------------------------------+""".format(*temp) | {13}| {14}| {15}| {16}| {17}| {18}| bar -1: {27} | {19}| {20}| {21}| {22}| {23}| {24}| end 1: {25}|
--------------------------------------------------------------------------
12 11 10 9 8 7 6 5 4 3 2 1
""".format(*temp)
def move_to_bar(self, to_idx): def move_to_bar(self, to_idx):
# Find the owner of the hit checker # Find the owner of the hit checker
player = self.state[to_idx] player = self.state[to_idx]