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]
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
def conclude(hex_message): track_ge_event(g.bot_addr, "conclude") wallet.clear_wallet_channel(hex_message, g.bot_addr) return []
def postfund_setup(hex_message): track_ge_event(g.bot_addr, "postfund") return prefund_setup(hex_message)
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]