16 lines
678 B
Plaintext
16 lines
678 B
Plaintext
required pygame library installed
|
|
change img directory in main.py line 13
|
|
|
|
board is represented as 2D lists of square objects, where first index of the list points to the row and second to the column
|
|
of the square(piece object) location
|
|
|
|
each square(piece object) contains own x and y identifiers and isSbThere atribute which stores info if detective is standing on
|
|
piece location
|
|
|
|
a_star algorithm:
|
|
-goal: nearest mushroom without posion, x,y finded by bfs
|
|
-get_cost: return summary cost of parent node and cost of current node (predictable heuristic cost and cost of field)
|
|
-heuristic function: summary of differences between node location and goal location
|
|
|
|
|