if(get_dir(A,D)==A.dir||get_dir(A,D)==turn(A.dir,45)||get_dir(A,D)==turn(A.dir,90)||get_dir(A,D)==turn(A.dir,135))
|
to check if D is in front or on the right-hand side (respectively) of A. Surely there's a better way? Also, is there a shorter way of using ||'s?
Many thanks.
~Ease~
Maybe there's a better way than that.