mirror of
https://github.com/dancojocaru2000/ai-project-idastar.git
synced 2025-02-23 00:49:34 +02:00
Added N+E+S+W and ALL constants in NDirections
This commit is contained in:
parent
64301e95a6
commit
055fa3aa3c
1 changed files with 5 additions and 1 deletions
|
@ -61,9 +61,13 @@ namespace IdaStar
|
|||
SE = 0b0010_0000,
|
||||
SW = 0b0100_0000,
|
||||
NW = 0b1000_0000,
|
||||
|
||||
N_E_S_W = 0b0000_1111,
|
||||
ALL = 0b1111_1111,
|
||||
}
|
||||
|
||||
public List<Point> GetNeighbours(byte directions = 0b1111) {
|
||||
public List<Point> GetNeighbours(NDirections directions = NDirections.N_E_S_W) => GetNeighbours((byte)directions);
|
||||
public List<Point> GetNeighbours(byte directions) {
|
||||
List<Point> result = new();
|
||||
|
||||
if ((directions & ((byte)NDirections.N)) > 0) {
|
||||
|
|
Loading…
Add table
Reference in a new issue