Fix valid moves calculation
Add test suite