+ def get_adjacent_positions(self):
+ positions = [self.position]
+
+ x, y = self.position
+
+ if self.bits.check_bit(BITS.NORTH) and y > 0:
+ positions.append((x, y - 1))
+ if self.bits.check_bit(BITS.SOUTH) and y < 4:
+ positions.append((x, y + 1))
+ if self.bits.check_bit(BITS.EAST) and x < 4:
+ positions.append((x + 1, y))
+ if self.bits.check_bit(BITS.WEST) and x > 0:
+ positions.append((x - 1, y))
+
+ return positions
+
+ def get_knight_positions(self):
+ positions = set([self.position])
+