Mainly such as I wrote before the static struct Snake function to define the coordinates of the length and direction, and the Food, but if make class alone, I don't know how to invoke the previously defined in another class member...
Each great god! The first post! Also hope you forgive me!!!!
CodePudding user response:
Before I wrote like this
Then the teacher asked to write like this

CodePudding user response:
Search "" Visual c + + classic case of game development, rounding" source code"CodePudding user response:
Can put you off part of the function, now split into several categories, is your teacher said, each function are encapsulated into a class, and then by creating a class object to manipulate the corresponding methodCodePudding user response:
The first figure is the C language programmingThe second figure is a c + + programming
CodePudding user response:
Object-oriented c + +, of course, going to class