Plagiarism?

I turned in a blackjack assignment for computer science that I did using a poorly written tutorial. I realized that the tutorial was based on the first thing that comes up when you type in blackjack Java code. While the tutorial didn’t give variable names, my program has the same structure as the one from the Internet. Did I plagiarize?