Which team is this player on? Friend or foe?
TeamCollection := GetPlayspace().GetTeamCollection()
Players := GetPlayspace().GetPlayers()
if (You := Players[0], Foe := Players[1]):
if (Attitude := TeamCollection.GetTeamAttitude[You, Foe]):
if (Attitude = team_attitude.Hostile):
Print("Foe spotted!")
Takeaway — Ask the team collection: friend or foe?