Add custom exceptions and error handling.

+ Add InvalidMoveException and move validation.
+ Add InvalidPlayerException and player validation.
+ Update necessary methods to throw exceptions.
+ Add Board.equals() method and update tests.