implements rule for straight moving / diagonal moving