ocadotechnology/aimmo

View on GitHub
aimmo-game-worker/simulation/pathfinding.py

Summary

Maintainability
A
2 hrs
Test Coverage

Showing 2 of 2 total issues

Function astar has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
Open

def astar(world_map, start_cell, end_cell):
"""
Returns a list of Cell as a path from the given start to the given end in the given world_map.
The best path navigates the obstacles (but not other avatars, as they're assumed to be moving).
For explanation of the A* pathfinding, see the medium post at the top.
Severity: Minor
Found in aimmo-game-worker/simulation/pathfinding.py - About 1 hr to fix

Function _get_adjacent_cells has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

def _get_adjacent_cells(current_node, world_map):
adj = []
# we move only in 4 directions
for direction in ALL_DIRECTIONS:
# make sure the cell is within the grid
Severity: Minor
Found in aimmo-game-worker/simulation/pathfinding.py - About 25 mins to fix

There are no issues that match your filters.

Category
Status