Skip to content

Commit 8d0cd9a

Browse files
authored
Update UtilityMapLibrary.py
1 parent 6fe5be7 commit 8d0cd9a

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

UtilityMapLibrary.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,13 +77,20 @@ def getUtilityCalculatedMap(self):
7777
def printArrowMap(self):
7878
for i in range(self.rowlen):
7979
for j in range(self.collen):
80-
print(self.map[i][j], end=" ")
80+
word_len = len(self.map[i][j])
81+
print(self.map[i][j], end="")
82+
for k in range(10 - word_len):
83+
print("",end=" ")
8184
print("")
8285

8386
def printUtilityMap(self):
8487
for i in range(self.rowlen):
8588
for j in range(self.collen):
86-
print("{0:.4f}".format(self.utility[i][j]), end=" ")
89+
print("{0:.4f}".format(self.utility[i][j]), end="")
90+
if self.utility[i][j] < 0:
91+
print("", end=" ")
92+
else:
93+
print("", end=" ")
8794
print("")
8895

8996

0 commit comments

Comments
 (0)