浏览代码

Install some formatting for buyout function

KeyMasterOfGozer 8 月之前
父节点
当前提交
7d06f90c29
共有 1 个文件被更改,包括 4 次插入2 次删除
  1. 4 2
      db.py

+ 4 - 2
db.py

@@ -70,6 +70,8 @@ def buyout():
     total=0
     cardCount=0
     NeededCards=[]
+    print(f"Cards Needed Today:")
+    print(f'    Name             Needed  Cost')
     for card in MarketCards:
         if 'CRYSTAL' not in Stock[card['card-num']]:
             card['stock']=int(Stock[card['card-num']])
@@ -79,7 +81,7 @@ def buyout():
             NeededCards.append(card)
             total+=card['total-cost']
             cardCount+=card['needed']
-            print(f"{card['card-num']: <3} {card['name']: <20} {card['needed']: >2} {card['total-cost']}")
+            print(f"{card['card-num']: >3} {card['name']: <20} {card['needed']: >2} {round(card['total-cost']): >5}")
     
     print(f"  Remaining Cards: {cardCount}")
-    print(f"Total Gems Needed: {total}")
+    print(f"Total Gems Needed: {round(total)}")