neighbors4

list neighbors only inside

  1. auto neighbors4(int[2] p)
  2. auto neighbors4(int[2] p, in Dungeon dg)
    neighbors4
    (
    int[2] p
    ,
    )

Examples

1 import std.algorithm : equal;
2 assert(equal(
3     [0, 0].neighbors4(Dungeon(3, 3)),
4     [[1, 0], [0, 1]],
5     ));

Meta