put all board and piece functionality into classes. not yet integrated into chess.game.php though.
simple unit tests for chess.php