Closed lky-bulbasaur closed 3 years ago
I would like to know if it is OK to make my
ComputerPlayer
's processing time instantaneous regardless of the number of pieces paused/terminated (e.g. through not invokinggetCandidateMove(Game, Source)
at all if a piece is paused, thus skipping the timeout in that method).
The tests will test whether you implement pause/terminate correct by calling getCandidateMove
and expecting it returns null.
So you shouldn't skip calling getCandidateMove()
when the piece is pause. But you can skip the timeout inside getCandidateMove
and make it return null
instantaneously.
Understood. Many thanks.
Despite the 1 second timeout required in
getCandidateMove(Game, Source)
in bothKnight
andArcher
classes, I often observe that theComputerPlayer
can make its move instantaneously. However, there are still some cases when theComputerPlayer
takes some time to process a turn, usually when more pieces are paused/terminated. Yet, in cases where theComputerPlayer
obviously has no available moves (e.g. when all its pieces are terminated), it still takes some time forComputerPlayer
to find out that it cannot make any moves, thus ending the game.I would like to know if it is OK to make my
ComputerPlayer
's processing time instantaneous regardless of the number of pieces paused/terminated (e.g. through not invokinggetCandidateMove(Game, Source)
at all if a piece is paused, thus skipping the timeout in that method).Thanks.