MCPcopy
hub / github.com/chynl/snake / adj

Method adj

src/pos.py:17–18  ·  view source on GitHub ↗
(self, direc: Direction)

Source from the content-addressed store, hash-verified

15 return self.row == other.row and self.col == other.col
16
17 def adj(self, direc: Direction) -> "Pos":
18 return Pos(self.row + direc.value[0], self.col + direc.value[1])

Callers 4

new_headMethod · 0.80
longer_pathMethod · 0.80
build_hamilton_indexMethod · 0.80
neighborsMethod · 0.80

Calls 1

PosClass · 0.85

Tested by

no test coverage detected