Texts: In Python, make sure it's working.
Write an LC-3 assembler program that checks whether the player is within a certain Euclidean distance of a specified "goal" point. Place your code in the assembly file "euclidean_dist.asm". The assembly file contains predefined constants, G_X, G_Y, and G_Z, that specify the position of the goal point. An additional predefined constant, GOAL_DIST, specifies the distance bound to be checked. You may assume that GOAL_DIST > 0. The Euclidean distance between the player and the goal point is given by:
deuclidean = (playerPos.x - G_X)^2 + (playerPos.y - G_Y)^2 + (playerPos.z - G_Z)^2
However, calculating this quantity is tricky in LC-3 because there is no square root. We will check the squared distances, i.e.:
(playerPos.x - G_X)^2 + (playerPos.y - G_Y)^2 + (playerPos.z - G_Z)^2 < GOAL_DIST^2
If this inequality is met, the program should output "The player is within distance of the goal" to Minecraft chat. Otherwise, it should output "The player is outside the goal bounds" to Minecraft chat.