import game.autoenv as autoenv env = autoenv.Environment(width=20, height=20) env.add_player("player", x=10, y=10) while True: env.render() action = input("Enter an action: ") env.step("player", action)
import game.autoenv as autoenv env = autoenv.Environment(width=20, height=20) env.add_player("player", x=10, y=10) env.add_wall(x=5, y=5) env.add_wall(x=5, y=6) while True: env.render() action = input("Enter an action: ") env.step("player", action)In this example, we add two walls to the environment at positions (5, 5) and (5, 6). These walls will prevent the player character from moving through them.