Advertisement
sol4r

AI_MAZE.py

Jan 9th, 2024 (edited)
788
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.58 KB | None | 0 0
  1. import openai
  2.  
  3. openai.api_key = "apikey"
  4.  
  5. # Store player positions
  6. player_positions = {}
  7.  
  8. def generate_dnd_maze():
  9.     text = "Create a playable in which I can navigate the player with (W, A, S, D) 20x40 dungeon maze in ASCII also draw it (Where E is end and S is start) for a Dungeons and Dragons game. Please include components and challenges (such as traps,), and provide a description of the entire scenario."
  10.     completion = openai.ChatCompletion.create(model="gpt-3.5-turbo", messages=[{"role": "user", "content": text}])
  11.     return completion.choices[0].message.content
  12.  
  13.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement