Thanks for noticing that! For this gamejam i tried to use a different approach since the theme was kinda constrictive with many games mainly focusing on time. Im glad you enjoyed the game!
Because I used unity I used something called an Overlap Circle to detect the player. Then used sin cos to make the "vision cone". When the player is inside the vision cone I simply called an raycast to see if anything was obstructing the guard's view.