hanyuone / Ways-to-NOT-make-money

A basic Python (2.x/3.x) incremental game.
8 stars 3 forks source link

Why are we only storing the last 8 digits of `money`? We don't have -illions #104

Open bortkiewicz opened 8 years ago

bortkiewicz commented 8 years ago
def savegame():
    global game_state
    data = ["auto", game_state.autoclick2, "print", game_state.printmoney2, "counter", game_state.counterfeit2,
            "shares", game_state.sharecrash2, "bank", game_state.bankheist2, "upg1h1", game_state.upgcheck1h1,
            "upg1h2", game_state.upgcheck1h2, "upg2h1", game_state.upgcheck2h1, "upg2h2", game_state.upgcheck2h2,
            "upg3", game_state.upgcheck3, "upg4", game_state.upgcheck4, "upg5", game_state.upgcheck5,
            "cupg1", game_state.clickupgcheck1, "cupg2", game_state.clickupgcheck2, "money",
            float(str(game_state.money)[-8:]), "time", game_state.timeplay, "clicks",
            game_state.totalclicks, "lotto", game_state.lottoprice]
    log('savegame invoked', data)

    log('savegame function')
    save_and_load.encode_and_save(username, data)

    toplevel = Toplevel()
    msg = Message(toplevel, text="Game saved!")
    msg.pack()

What the heck is going on.

joshgit commented 8 years ago

The game is being saved?

hanyuone commented 8 years ago

Yeah... what else did you think would happen, @joshgit?

bortkiewicz commented 8 years ago

why are we only storing the last 8 digits? float(str(game_state.money)[-8:])