Finish Luna; pretty item list
This commit is contained in:
parent
13eb7979e9
commit
d183c57d18
10
main.py
10
main.py
@ -1,6 +1,6 @@
|
||||
import os
|
||||
|
||||
PLAYER_INIT_LOCATION = "BoB"
|
||||
PLAYER_INIT_LOCATION = "Luna"
|
||||
|
||||
class Player:
|
||||
|
||||
@ -66,9 +66,9 @@ class TradeHub:
|
||||
def getItems(self):
|
||||
return self.items
|
||||
def printItems(self):
|
||||
print(f"{'Name' : <15}{'* * * * * | * * * * *' : ^10}{'Cost' : >6}")
|
||||
for item in self.items.values():
|
||||
print("Name:", item.getName())
|
||||
print("Cost:",item.getPrice())
|
||||
print(f"{item.getName() : <15}{'* * * * * | * * * * *' : ^10}{str(item.getPrice()) : >5}")
|
||||
print()
|
||||
|
||||
class Item:
|
||||
@ -82,7 +82,6 @@ class Item:
|
||||
def getPrice(self):
|
||||
return self.price
|
||||
|
||||
|
||||
def clearScreen():
|
||||
os.system('clear')
|
||||
|
||||
@ -124,9 +123,8 @@ def mainGame():
|
||||
"Luna" : Planet("Luna")
|
||||
}
|
||||
planets["BoB"].addTradeHub(tradeHubs["Star Crapper"])
|
||||
planets["Luna"].addTradeHub(tradeHubs["The Jackel"])
|
||||
|
||||
planetLuna = Planet("Luna")
|
||||
planetLuna.addTradeHub(tradeHubs["The Jackel"])
|
||||
|
||||
# Create user
|
||||
userInput = ""
|
||||
|
Loading…
x
Reference in New Issue
Block a user