Code Review – Group 11
|
So looking at your code, you have a Ginny class… but you don’t actually use it. Instead everything is handled in your main function. Due to this it’s really hard to follow what’s going on. As for your Ginny class, its bindings are screen dimensions, a sprite and a pointer to a sf::Keyboard. You probably don’t need to have a sf::Keyboard pointer. Since sf::Keyboard has a static function sf::Keyboard::IsKeyDown which returns the current state of a key, you could call that instead of passing around a pointer to it. In terms of sprite management, I would probably prefer to have each class take care of creating its own sprite, combined with a sprite manager. Instead of relying on being passed a sprite. Since you could pass any sprite to the class which is probably unintended. That’s really all I can say since the class itself doesn’t have more functionality than that. As for the actual code used in game, I can’t find any reference to the player class. I also can’t really figure out what things do, how they relate or interact, due to the code not being readable nor organized.
|