
def redfish(payload,put,get):
    base = {}
    base.update(payload)
    payload = base
    put("in the left side of the tank, there is a rock")
    payload['next'] = 'redfishA'
    if 'swim' in get("you can swim ! ",['swim']):
        put('you are swiming to the other side of the tank')
        payload['next'] = 'redfishB'
    return payload

def redfishB(payload,put,get):
    put("in the right side of the tank, there is an algea")
    payload['next'] = 'redfishB'
    if 'swim' in get("you can still swim ! ",['swim']):
        put("you swimmed back to the later side of the tank")
        payload['next'] = 'redfishA'
    return payload

world = {
    'redfishA':redfish,
    'redfishB':redfishB
}
begin = 'redfishA'

if __name__ == '__main__':
    pass
