added error case for getPieceByNumber(), fixed getPieceByDirection() to handle moves on different rows, added and updated tests