Implement place_room method
This commit is contained in:
		@@ -42,6 +42,16 @@ class Generator:
 | 
			
		||||
                            level[ly][lx] == Tile.FLOOR:
 | 
			
		||||
                        return False
 | 
			
		||||
        return True
 | 
			
		||||
 | 
			
		||||
    @staticmethod
 | 
			
		||||
    def place_room(level, y, x, door_y, door_x, room):
 | 
			
		||||
        rh, rw = len(room), len(room[0])
 | 
			
		||||
        # maybe place Tile.DOOR here ?
 | 
			
		||||
        level[door_y][door_x] = Tile.FLOOR
 | 
			
		||||
        for ry in range(rh):
 | 
			
		||||
            for rx in range(rw):
 | 
			
		||||
                if room[y][x] == Tile.FLOOR:
 | 
			
		||||
                    level[y-door_y][y-door_x] = Tile.FLOOR
 | 
			
		||||
    def corr_meta_info(self):
 | 
			
		||||
        if random() < self.params["corridor_chance"]:
 | 
			
		||||
            h_sup = randint(self.params["min_h_corr"], \
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user