boolean tryPlace(int i, int x1, int y1, int x2, int y2) {
		if (x2 < 0 || x2 >= w || y2 < 0 || y2 >= h)
			return false;
		// not empty place
		if (field[x1][y1] != -1 || field[x2][y2] != -1)
			return false;
		// border OK
		if (isValid(D[i].d1, x1, y1) && isValid(D[i].d2, x2, y2)) {
			// mark D
			D[i].x1 = x1;
			D[i].x2 = x2;
			D[i].y1 = y1;
			D[i].y2 = y2;
			// mark field
			field[x1][y1] = D[i].d1;
			field[x2][y2] = D[i].d2;
			if (placeDomino(i + 1))
				return true;
			// clear field
			field[x1][y1] = -1;
			field[x2][y2] = -1;
			// clear D (for debugging)
			D[i].x1 = -1;
			D[i].x2 = -1;
			D[i].y1 = -1;
			D[i].y2 = -1;
		}

		return false;
	}