Scala chess move generation and validation