Using callback to set the Sprite properties

Create the function configureCharacter that receives a function as
parameter and use it to configure the character sprite. In this way,
it is no more needed to hardcode the character sprite configuration
in the setCharacterConfiguration function.