This was a popular genre waaay back in the day. My favorite was Demon's Forge, the first commercial game by Brian Fargo (The Bard's Tale, Fallout). Back then when we made games like this there wasn't enough memory for images so we recorded coordinates to draw lines and flood fills.