Advertisement
Wyverm

Untitled

Mar 23rd, 2019
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.56 KB | None | 0 0
  1. import random
  2. from random import randrange,randint
  3. import replit
  4. from replit import clear
  5. clear()
  6.  
  7. pls = '+'
  8. #Coordinate Vars. (y,x)
  9. CHAR_YX = [5,5]
  10. DOOR_TOP = [-11,5]
  11. DOOR_BOT = [11,5]
  12.  
  13. FLOOR = 0
  14. ROOM = 0
  15.  
  16. DUNGEON = [
  17. [ #First FLOOR of the DUNGEON
  18. [(11)* [pls] for i in range(11)], #ROOM 1 (0)
  19. [(11)* [pls] for i in range(11)], #ROOM 2 (1)
  20. [(11)* [pls] for i in range(11)], #ROOM 3 (2)
  21. [(11)* [pls] for i in range(11)], #ROOM 4 (3)
  22. [(11)* [pls] for i in range(11)] #ROOM 5 (4)
  23. ],
  24. [ #Second FLOOR of the DUNGEON
  25. [(11)* [pls] for i in range(11)], #ROOM 1 (0)
  26. [(11)* [pls] for i in range(11)], #ROOM 2 (1)
  27. [(11)* [pls] for i in range(11)], #ROOM 3 (2)
  28. [(11)* [pls] for i in range(11)], #ROOM 4 (3)
  29. [(11)* [pls] for i in range(11)] #ROOM 5 (4)
  30. ],
  31. [ #Third FLOOR of DUNGEON
  32. [(11)* [pls] for i in range(11)], #ROOM 1 (0)
  33. [(11)* [pls] for i in range(11)], #ROOM 2 (1)
  34. [(11)* [pls] for i in range(11)], #ROOM 3 (2)
  35. [(11)* [pls] for i in range(11)], #ROOM 4 (3)
  36. [(11)* [pls] for i in range(11)] #ROOM 5 (4)
  37. ]
  38. ]
  39.  
  40. def DunGen():
  41. #Var Bank
  42. global FLOOR
  43. global ROOM
  44. global DUNGEON
  45. global DOOR_TOP
  46. global DOOR_BOT
  47.  
  48. #Actual printing of dungeon
  49. DUNGEON[FLOOR][ROOM][CHAR_YX[0]][CHAR_YX[1]] = '@'
  50. if ROOM >= 0 and ROOM != 4:
  51. DUNGEON[FLOOR][ROOM][DOOR_TOP[0]][DOOR_TOP[1]] = 'D'
  52. DUNGEON[FLOOR][ROOM][DOOR_BOT[0]][DOOR_BOT[1]] = 'D'
  53. print(" FLOOR " + str(FLOOR+1) + " ROOM " + str(ROOM+1))
  54. print('\n'.join(' '.join(row) for row in DUNGEON[FLOOR][ROOM]))
  55. print('---------------------')
  56.  
  57.  
  58.  
  59. DunGen()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement