MCPcopy Create free account
hub / github.com/codecombat/codecombat / complexifyPos

Function complexifyPos

app/lib/level-generation.js:964–967  ·  view source on GitHub ↗
(pos)

Source from the content-addressed store, hash-verified

962}
963
964function complexifyPos (pos) {
965 // Go from { x: 0, y: 0 } as middle of lower left square to { x: 6, y: 6 }
966 return new Vector(Math.round(pos.x * 8 + 6), Math.round(pos.y * 8 + 6))
967}
968
969function manhattanDistance (a, b) {
970 return Math.abs(a.x - b.x) + Math.abs(a.y - b.y)

Callers 2

findThangAtFunction · 0.85
moveThangFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected