Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import random
- from random import randrange,randint
- import replit
- from replit import clear
- clear()
- pls = '+'
- #Coordinate Vars. (y,x)
- CHAR_YX = [5,5]
- DOOR_TOP = [-11,5]
- DOOR_BOT = [11,5]
- FLOOR = 0
- ROOM = 0
- DUNGEON = [
- [ #First FLOOR of the DUNGEON
- [(11)* [pls] for i in range(11)], #ROOM 1 (0)
- [(11)* [pls] for i in range(11)], #ROOM 2 (1)
- [(11)* [pls] for i in range(11)], #ROOM 3 (2)
- [(11)* [pls] for i in range(11)], #ROOM 4 (3)
- [(11)* [pls] for i in range(11)] #ROOM 5 (4)
- ],
- [ #Second FLOOR of the DUNGEON
- [(11)* [pls] for i in range(11)], #ROOM 1 (0)
- [(11)* [pls] for i in range(11)], #ROOM 2 (1)
- [(11)* [pls] for i in range(11)], #ROOM 3 (2)
- [(11)* [pls] for i in range(11)], #ROOM 4 (3)
- [(11)* [pls] for i in range(11)] #ROOM 5 (4)
- ],
- [ #Third FLOOR of DUNGEON
- [(11)* [pls] for i in range(11)], #ROOM 1 (0)
- [(11)* [pls] for i in range(11)], #ROOM 2 (1)
- [(11)* [pls] for i in range(11)], #ROOM 3 (2)
- [(11)* [pls] for i in range(11)], #ROOM 4 (3)
- [(11)* [pls] for i in range(11)] #ROOM 5 (4)
- ]
- ]
- def DunGen():
- #Var Bank
- global FLOOR
- global ROOM
- global DUNGEON
- global DOOR_TOP
- global DOOR_BOT
- #Actual printing of dungeon
- DUNGEON[FLOOR][ROOM][CHAR_YX[0]][CHAR_YX[1]] = '@'
- if ROOM >= 0 and ROOM != 4:
- DUNGEON[FLOOR][ROOM][DOOR_TOP[0]][DOOR_TOP[1]] = 'D'
- DUNGEON[FLOOR][ROOM][DOOR_BOT[0]][DOOR_BOT[1]] = 'D'
- print(" FLOOR " + str(FLOOR+1) + " ROOM " + str(ROOM+1))
- print('\n'.join(' '.join(row) for row in DUNGEON[FLOOR][ROOM]))
- print('---------------------')
- DunGen()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement