Below is a code, produced by no other than me. I'm a newbie, and this code is probably awfully arranged and thought out. But i'd love it if you would test it out and take a look and give me your opinions on it.
Controls:
WASD to move.
G to change from creative mode to play mode, the NPC moves in play mode and you can't place blocks. In creative you can place blocks down and set the NPC starting spot and remove blocks(do not place more than 1 NPC).
IJKL to set things or remove things in a certain direction I to place up K to place down JL for left and right.
E to toggle delete.
Q to toggle walls.
Z to toggle NPC.
You probably need to delete the stdafx.h include.