NPC functions

Just a quick beginning with the logical part of the NPC's movement,
still have to do the actual sprite rendering.