Linting
This commit is contained in:
		@@ -24,10 +24,10 @@ DEFAULT_PARAMS = {
 | 
			
		||||
    "loop_max": 5,
 | 
			
		||||
    "loop_threshold": 15,
 | 
			
		||||
    "spawn_per_region": [1, 2],
 | 
			
		||||
    "room_chances" : {
 | 
			
		||||
        "circular" : 5,
 | 
			
		||||
        "chunks" : 1,
 | 
			
		||||
        },
 | 
			
		||||
    "room_chances": {
 | 
			
		||||
        "circular": 5,
 | 
			
		||||
        "chunks": 1,
 | 
			
		||||
    },
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@@ -269,19 +269,19 @@ class Generator:
 | 
			
		||||
        nb_chunks, r = 6, 3
 | 
			
		||||
 | 
			
		||||
        h_sup, w_sup, h_off, w_off = self.corr_meta_info()
 | 
			
		||||
        room = [[Tile.EMPTY] * (width + w_sup) \
 | 
			
		||||
        room = [[Tile.EMPTY] * (width + w_sup)
 | 
			
		||||
                for _dummy in range(height + h_sup)]
 | 
			
		||||
 | 
			
		||||
        def draw_chunk(room, y, x):
 | 
			
		||||
        def draw_chunk(room: List[List[Tile]], y: int, x: int) -> None:
 | 
			
		||||
            for i in range(y - r, y + r + 1):
 | 
			
		||||
                d = (y - i)**2
 | 
			
		||||
                for j in range(x - r, x + r + 1):
 | 
			
		||||
                    if d + (x - j)**2 < r**2:
 | 
			
		||||
                    if d + (x - j) ** 2 < r ** 2:
 | 
			
		||||
                        room[i][j] = Tile.FLOOR
 | 
			
		||||
 | 
			
		||||
        draw_chunk(room, h_off + height//2 + 1, w_off + width//2 + 1)
 | 
			
		||||
        draw_chunk(room, h_off + height // 2 + 1, w_off + width // 2 + 1)
 | 
			
		||||
 | 
			
		||||
        min_w, max_w = w_off + r + 1, width + w_off - r -1
 | 
			
		||||
        min_w, max_w = w_off + r + 1, width + w_off - r - 1
 | 
			
		||||
        min_h, max_h = h_off + r + 1, height + h_off - r - 1
 | 
			
		||||
        for i in range(nb_chunks):
 | 
			
		||||
            y, x = randint(min_h, max_h), randint(min_w, max_w)
 | 
			
		||||
@@ -359,9 +359,9 @@ class Generator:
 | 
			
		||||
                break
 | 
			
		||||
 | 
			
		||||
        if key == "circular":
 | 
			
		||||
            return self.create_circular_room(spawnable = spawnable)
 | 
			
		||||
            return self.create_circular_room(spawnable=spawnable)
 | 
			
		||||
        elif key == "chunks":
 | 
			
		||||
            return self.create_chunk_room(spawnable = spawnable)
 | 
			
		||||
            return self.create_chunk_room(spawnable=spawnable)
 | 
			
		||||
 | 
			
		||||
    def register_spawn_area(self, area: List[List[Tile]]) -> None:
 | 
			
		||||
        """
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user