Make formatting compliant with the PEP8 standard

- use 4 spaces for indentation instead of mix of 2 spaces and tabs
- add PEP263 encoding specification
- remove unneeded parentheses
- remove unneeded empty lines, add extra empty lines where required
- break multiple statements on a single line into multiple lines
- rename variables
Further refactoring of code to make it more pythonic

- break the single-line conditional into multiple lines (this is not perl)
- catch the exception instead of checking if a key is in the dict
- only import curses and access its content through that
Magic removal

- use coordinate increments for directions instead of functions
- reorder the directions to be clockwise
- don't use tuple unpacking when passing arguments
Fix a rotated map bug

The map was displayed as in the source code, but the checks for walls
were rotated 90% (the x and y coordinates were switched). It wasn't
visible, because the example map is symmetric.
Use a class instead of closures

- put the whole game in a Game class
- put the main loop in a main method
- store the game state as instance attributes
- rely on side effects to move the player
Get rid of draw_tile method

That method is a single line of code that really doesn't save us any
work. If we ever need to extend that code, we can always put it back.
Raise an exception when the player is blocked

When the player tries to move into a wall, it is a failure of movement,
so an appropriate exception is raised. Since we don't do anything
specific in that case, that exception is later caught and ignored.
Don't run the main loop from __init__

Instead of calling the main loop directly from the class' initializer,
we make a small wrapper function to create the Game object and call
the main loop explicitly. This way it's possible to create a Game object
without running the main loop, and do some testing or monkey patching on
it first.