Board validation and unit tests

Added isValid method to Board. Added basic unit test framework. Changed
tile value array from 2D to 1D (easier to pass around).