Homework 4 Puzzle Refactor
added explanation of puzzle logic