Of course, but take in consideration that he has stated that he is just a beginner. At this stage it is of critical importance to take the knowledge you have, and convert it into code. He could spend another few months learning the theory behind everything needed to structure a game without ever accomplishing something - or he can learn something, do something practical with it and improve on it when he learns something new.
I could have given an example with a player class.. but it still would be "messy" code. I'll have to add something like an:
- Object Manager ... nope still bad coding practice, resources are not loaded properly
- Add an resource manager, nope still not good enough, physics should be handled by it's own class.
- Add a physics manager. Logic and display should be decoupled, add a graphics class..
I could go on and on, there will always be more stuff that can be added to try and eliminate "bad practices". I did not want to write a 10 000 line game engine as an answer to his question so I adjusted my programming to fit his style, no matter at what level he is. I saw that he is not yet comfortable with functions so I excluded the idea of reference passing.
This guy is trying his best to create something while he is relatively new. As he does more he will realize that he needs something else, and he will ask more questions and so his programming practices will get better over time :)