Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | n/a |
0 / 0 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
1 | <?php |
2 | /** |
3 | * Jingga |
4 | * |
5 | * PHP Version 8.1 |
6 | * |
7 | * @package phpOMS\Algorithm\PathFinding |
8 | * @copyright Dennis Eichhorn |
9 | * @license OMS License 2.0 |
10 | * @version 1.0.0 |
11 | * @link https://jingga.app |
12 | */ |
13 | declare(strict_types=1); |
14 | |
15 | namespace phpOMS\Algorithm\PathFinding; |
16 | |
17 | /** |
18 | * Path finder interface |
19 | * |
20 | * @package phpOMS\Algorithm\PathFinding |
21 | * @license OMS License 2.0 |
22 | * @link https://jingga.app |
23 | * @since 1.0.0 |
24 | */ |
25 | interface PathFinderInterface |
26 | { |
27 | /** |
28 | * Find path from one point to another |
29 | * |
30 | * @param int $startX Start point X-Coordinate |
31 | * @param int $startY Start point Y-Coordinate |
32 | * @param int $endX End point X-Coordinate |
33 | * @param int $endY End point Y-Coordinate |
34 | * @param Grid $grid Grid with the walkable points |
35 | * @param int $heuristic Heuristic algorithm to use in order to calculate the distance for a good path |
36 | * @param int $movement Allowed movement (e.g. straight, diagonal, ...) |
37 | * |
38 | * @return Path |
39 | * |
40 | * @since 1.0.0 |
41 | */ |
42 | public static function findPath( |
43 | int $startX, int $startY, |
44 | int $endX, int $endY, |
45 | Grid $grid, |
46 | int $heuristic, int $movement |
47 | ) : Path; |
48 | } |