2. Creating a Class
2.1. Naming Classes
By convention, the name of the class is in camel case. e.g. LevelGame.
Each word is capitalized and there are no underscores.
2.2. Class Creation
The code below creates a class,
The keyword class is followed by the name of the class then a colon. e.g.
passis used as a placeholder for future code, since empty code is not allowed in a class.
When the pass statement is executed, nothing happens, but getting an error is avoided.
class LevelGame: pass
2.3. Object instantiation
An object is what is made from the class blueprint.
Objects are instances of classes.
The code below carries out object instantiation (making an instance).
gameinstance is created by calling the class,
LevelGame(), and assigning that to the variable
gameis an instance of the class
class LevelGame: pass game = LevelGame()