public ArrayList<XY> getPossibleMoves(Board board) {
		ArrayList<XY> output = new ArrayList<>();
		// cycle of directions
		int thisX = this.getXY().getX();
		int thisY = this.getXY().getY();
		for (int[] dir : getDirections()) {
			int i = 1;
			while (true) {
				if (i > getMoveLen())
					break;
				int newX = thisX + dir[0] * i;
				int newY = thisY + dir[1] * i;
				XY xy = XY.getNewXY(newX, newY);
				if (xy == null) {
					break;
				}
				i++;
				Figure fig = board.getFigure(newX, newY);
				if (fig == null) {
					output.add(xy);
					continue;
				}
				if (this.isEnemy(fig))
					output.add(xy);
				break;
				
			}
		}
		return output;
		
	}