It depends on your goal. If your goal was to stick it to him because you have the ultimate power over the food available to him and he didn't give you all the attention you wanted when you wanted, you did that.
If your intention is to teach him how to be courteous to family members, then the action was in the wrong direction because to teach that, you'll want to model that. If your goal was the latter, you might consider what you would have done for a friend who was in the middle of something they cared about. You might have taken it at face value that he trusted you to order what you knew he'd want (or close enough) and just ordered him something.
If your goal was to make it unpleasant for him to do video games, your behavior was so unkind that I'm afraid you failed that miserably: he won't remember that he was playing a video game; instead, he'll remember that you used your superiority to deliver a consequence with no warning.
Fortunately, repairing a mistake with a kid goes a long way toward building long-term respect and teaching how to behave with dignity. If you go back to apologize for the surprise consequence and to talk in a more adult way about what was really bothering you, you will use your power in the best way possible, to turn your mistake into a positive moment in your relationship.