Grid model

Assignment 6 - finished functionality of game. The grid completes only when everything is consistent and therefore correct. Added unit tests, ran Analyze tool, fixed formatting for comments and style.