While writing unit tests, the following bugs were found and fixed:
Typo in DIAGONAL constant, where there are 2 (-1, 1).
env.possible_actions needs to be cleared when calling get_possible_actions(). This is to remove the actions generated from the previous move. Clearing might not be ideal since it is very expensive, so I've added a TODO for a future PR.
The unit tests for other pieces will be in a separate PR to make each PR small and manageable.
Type of change
[] Bug fix (non-breaking changes which fixes an issue)
[X] New feature (non-breaking changes which adds certain functionality)
[] Documentation update (updating documentations)
[] Breaking change (fix that breaks existing functionality)
Description
This PR adds unit tests for the following pieces:
While writing unit tests, the following bugs were found and fixed:
DIAGONAL
constant, where there are 2(-1, 1)
.env.possible_actions
needs to be cleared when callingget_possible_actions()
. This is to remove the actions generated from the previous move. Clearing might not be ideal since it is very expensive, so I've added a TODO for a future PR.The unit tests for other pieces will be in a separate PR to make each PR small and manageable.
Type of change
How has this been tested?
CI