check if king is in check, some fixes
Update test.php
Fix major error in isValidMove