474 B
474 B
11.3. Chess test
In a chess game there's the following method: boolean canMoveTo(int x, int y). This is part of the Piece class and returns whether or not the piece can move to position (x,y). Test this method
- Test for normal inputs: values of x,y in the range [1,8]
- Test for extreme cases: values of 0, bigger than 8, float inputs
- Test for illegal inputs: negative numbers, strings, arrays
- Test for strange inputs
Test each piece, all 6 pieces in chess.