Added check for wrong width and height to GameComponent

Created a test for the checking