Bedazzled-the guy in jail.....Who was he?

In the movie Bedazzled…This guy in jail gives this really sage advice about the main characters soul etc…Who exactly was this guy in jail?? an angel? god? and y was he playing chess with the devil at the end of the movie??

Yes, he was God. That’s why he was playing Chess with The Devil. It was a joke, that kind of suggested that The Devil has a role to play, but is only evil to those who deserve it, and likes to play around.

Brendan Fraser was at risk of being a selfish jerk until his last wish. Selfish jerks get what they deserve. Selfless lovable lunkheads similarly get what they deserve. The game was designed to determine which he really was.

Incidentally, the geeky girl he finds at the end - she was cool. I wish I knew someone like her.