My problem is that program is not reading codes as i intended "he" would.
I have
if (hero.getPos() == (6 | 11 | 16)) {
move = new Object[] {"Up", "Right", "Left"};
} else {
move = new Object[] {"Up", "Down", "Right", "Left"};
}
When hero position is 6, the program still goes to else.
Why is that? Is it because of operands? If yes, how should i change it?