This is an RCr 11.42 proceeding in which the appellant was granted a hearing. The trial court overruled appellant’s motion to set aside a judgment sentencing him to 10 years in prison upon a plea of guilty to a charge of armed assault with intent to rob. *141Appellant’s basic ground for relief is that he was denied his constitutional right to a trial by jury because he did not intelligently waive this right when he pleaded guilty.
Appellant was 18 years of age, and in 1967 and 1968 a series of events caused him to run progressively afoul of the law. He was first in company with a friend who cashed a forged check. He was next involved in an automobile hit-and-run accident. Upon being arrested on the latter charge, he escaped from jail. The following day he broke into a private residence, in company with two other escapees. When the owner returned, one of his companions proceeded to shoot the former. The next day appellant surrendered to the sheriff.
Three days later he was indicted for (1) armed assault with intent to rob, (2) dwelling-house breaking, (3) forgery and (4) hit and run. (For some undisclosed reason, he apparently was not prosecuted for escaping jail.) That day he was arraigned on these charges and an attorney was appointed to represent him. After rather thorough negotiations between his appointed attorney and the Commonwealth’s Attorney, the latter agreed to recommend a 10-year sentence on a guilty plea to the armed assault charge. The guilty plea was entered, and appellant was sentenced to a 10-year term. The other charges were dismissed.
It is appellant’s contention that his constitutional rights were violated when an attorney was not appointed for him immediately after his arrest, when the sheriff obtained a confession from him about entering the dwelling house without advising him of his rights, when he was not granted a preliminary hearing, when his court-appointed counsel did not sufficiently advise him of the minimum penalties he might receive on the various charges, and when he pleaded guilty to a crime which he says he did not comtnit. He relies on Escobedo v. Illinois, 378 U.S. 478, 84 S.Ct. 1758, 12 L.Ed.2d 977; Miranda v. Arizona, 384 U. S. 436, 86 S.Ct. 1602, 16 L.Ed.2d 694, and Crooker v. California, 357 U.S. 433, 78 S. Ct. 1287, 2 L.Ed.2d 1448.
In our opinion the alleged violations of his rights prior to arraigment became moot if he intelligently and voluntarily pleaded guilty upon competent advice of his court-appointed attorney. It may be observed that appellant had no constitutional right to an examining trial, Commonwealth v. Watkins, Ky., 398 S.W.2d 698; that the illegality of his confession is not a ground for an RCr 11.42 attack on a conviction entered pursuant to a plea of guilty, Cox v. Commonwealth, Ky., 411 S.W.2d 320; and that the evidence of his guilt is immaterial on his plea of guilty, Humphries v. Commonwealth, Ky., 397 S.W.2d 163, and King v. Commonwealth, Ky., 408 S.W.2d 622.
The whole thrust of appellant’s argument is that if he had known that his confession was illegal and if he had known what the minimum penalty was for dwelling-house breaking, he would not have agreed to accept a 10-year sentence. This has some ring of plausibility until we look realistically at the situation on the day of his arraignment. At that time he had four serious felony charges against him. He had advised his attorney of his participation in each of the incidents out of which those charges arose, and it appears the Commonwealth intended to prosecute those charges and apparently had substantial evidence to support them. One of his associates, who was similarly involved only in the house-breaking episode, had pleaded guilty and accepted a 15-year sentence. Appellant was in serious trouble. The court appointed competent counsel to represent him. This attorney was not only cognizant of appellant’s rights but was also cognizant of what appellant would have to face if he went to trial. He worked diligently to obtain for appellant the minimum sentence which the Commonwealth’s Attorney would recommend upon a plea of guilty. He had the right to consider the whole picture in the best interests of his client even though the client insisted *142he was not guilty of one of the charges. The appointment of counsel would he a mockery if his professional advice was ineffective because the defendant was not specifically advised of each and every consideration upon which the attorney based his judgment.
Appellant does not contend that he did not fully understand the consequences of his plea of guilty. He was informed of the position of the Commonwealth, which initially insisted on 21 years, and participated in the process by which his sentence was reduced to 10 years. In our opinion he was sufficiently advised of his rights by competent counsel and he intelligently and voluntarily chose to accept his counsel’s recommendation, thereby waiving his right to a jury trial. See Lawson v. Commonwealth, Ky., 386 S.W.2d 734, and Smith v. Commonwealth, Ky., 404 S.W.2d 285. The wheels of justice cannot be reversed every time a defendant who has been sentenced on a guilty plea has a speculative afterthought that he may get off better the next time around, with or without a jury trial. We find no grounds which would void the judgment of conviction and the trial court did not err in declining to vacate it.
The judgment is affirmed.
All concur.