I would have plead not guilty.
I would also be disgusted with the judge and the [court personnel] making a game and a joke of the court. The legal system is enough of a disgrace when everyone is trying to do things the right way.
This is an example of a common situation where the judge holds himself above the law and confuses it with his own whims.
It is contemptible.
Second this--particularly with traffic court, which is typically a joke to begin with. In most cases it is there to raise revenue, as opposed to making the roads safer--and in many/most jurisdictions, there is a way to get around it for those in the know, or willing to buy their way out of points....