def shift_forward(self, ref_color, times=1):
        direction = 1 if ref_color == color.white else -1
        try:
            return Location(self._rank + times*direction, self._file)
        except IndexError as e: