Personnaly, I’ve used the following code
mapPos = Vector2Negate(knight.getWorldPos());
instead of
mapPos = Vector2Scale(knight.getWorldPos(), -1.f);
I find it clearer.
But perhaps the solution in the courses is better. Tell me if it’s the case.