Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- wallet = 20.0
- inventory = 0.0
- wallet_data = [wallet]
- inventory_data = [inventory]
- networth_data = [wallet+inventory]
- times = [0]
- for e in events:
- if e.type == 'ItemBought':
- inventory += e.value
- wallet -= e.price
- if e.type == 'AuctionSold':
- wallet += e.price
- inventory -= e.value
- wallet_data.append(wallet)
- inventory_data.append(inventory)
- networth_data.append(wallet+inventory)
- times.append(e.time)
Add Comment
Please, Sign In to add comment