Add castlings
Update test.php
Update test.php
Fix  error in castling check

There was an infinite loop in the check, if a king can castle.
Merge pull request #9 from jupiter24/issue6

Issue6