(pos)
| 962 | } |
| 963 | |
| 964 | function 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 | |
| 969 | function manhattanDistance (a, b) { |
| 970 | return Math.abs(a.x - b.x) + Math.abs(a.y - b.y) |
no outgoing calls
no test coverage detected