I have another doubt. It works the last method for pausing the game, but when the game is "frozen", I mean, that a pause method is working when I hit any other key of the keyboard, the game moves a little bit, I mean, it moves 1 millisecond or something like that every time I hit a key.
is there other way to implement a effective pausing method?