ill try to explain the clauses for it to be true
x can be 1 or -1 but has to be one of those 2
y has to be 1 if king is false or y can be 1 or -1 if king is true
Code:
x=1 | x=-1 | y=1 | y=-1 | king true | king false | desired result
____|______|_____|______|___________|____________|_________________
0 | 1 | 0 | 1 | 0 | 1 | 0
0 | 1 | 1 | 0 | 0 | 1 | 1
1 | 0 | 0 | 1 | 0 | 1 | 0
1 | 0 | 1 | 0 | 0 | 1 | 1
0 | 1 | 0 | 1 | 1 | 0 | 1
0 | 1 | 1 | 0 | 1 | 0 | 1
1 | 0 | 0 | 1 | 1 | 0 | 1
1 | 0 | 1 | 0 | 1 | 0 | 1
hopefully the truth table will come out ok
coop