def east_command(character):
    if character.room in [mountain1, village1, rocks1]:
        write(text, 'You walk to the east.')
        character.loc[1] = character.loc[1] + 1
        chooseroom(character)
        bach(character)
        much(character)
        noreplace_write(text,
                        'You are now at the ' + character.room['locname'])
        noreplace_write(text, character.room['setting'])
        character.health = character.health - 2
    else:
        write(text, 'You can\'t go that way!')
def north_command(character):
    if character.room in [beach1, jungle1, hill1, cliff1]:
        write(text, 'You walk to the north.')
        character.loc[0] = character.loc[0] + 1
        chooseroom(character)
        bach(character)
        much(character)
        noreplace_write(text,
                        'You are now at the ' + character.room['locname'])
        noreplace_write(text, character.room['setting'])
        character.health = character.health - 2
    else:
        write(text, 'You can\'t go that way!')
def west_command(character):
    if character.room in [waterfall1, jungle1, beach1]:
        write(text, 'You walk to the west.')
        character.loc[1] = character.loc[1] - 1
        chooseroom(character)
        bach(character)
        much(character)
        noreplace_write(text,
                        'You are now at the ' + character.room['locname'])
        noreplace_write(text, character.room['setting'])
        character.health = character.health - 2
    else:
        write(text, 'You can\'t go that way!')