Example #1
0
def from_game_reveal(hex_message):
    track_ge_event(g.bot_addr, "from_game_reveal")
    wallet.set_last_opponent_move(hex_message, g.bot_addr)
    if not coder.get_state_balance(hex_message, 0) or not coder.get_state_balance(hex_message, 1):
        wallet.clear_wallet_channel(hex_message, g.bot_addr)
        return [coder.conclude]
    return [coder.new_game]
Example #2
0
def prefund_setup(hex_message):
    track_ge_event(g.bot_addr, "prefund")
    state_count = coder.get_state_count(hex_message)
    transformations = []
    if state_count:
        raise PlayerAError()
    else:
        transformations = [coder.increment_state_count]

    return transformations
Example #3
0
def conclude(hex_message):
    track_ge_event(g.bot_addr, "conclude")
    wallet.clear_wallet_channel(hex_message, g.bot_addr)
    return []
Example #4
0
def postfund_setup(hex_message):
    track_ge_event(g.bot_addr, "postfund")
    return prefund_setup(hex_message)
Example #5
0
def from_game_propose(_hex_message):
    track_ge_event(g.bot_addr, "from_game_propose")
    return [playera_pays_playerb, play_move, coder.increment_game_position]