Closed Kelvinluk827 closed 3 years ago
As I have seen no mutators for behaviour of piece
Don't get your point.
In PA3, the game has two kinds of players, ComputerPlayer
and HumanPlayer
. Smart
strategy and behviours are only applied for ComputerPlayer
.
To set the ComputerPlayer
to Smart
, it is done by changing the call to construction in Main.java
right?
However, after changing the strategy, the behaviours of each piece is still Random
, as there is no mutators such that I can modify the behaviours of pieces when I am formulating my Smart
strategy.
Or is that the behaviour of each piece is set when constructed, and It is now allowed to change again?
The behaviours of pieces are settled when they are constructed. So you also need to change the way you construct those pieces.
Ok thank you very much!
Is that in running the game, user cannot select a smart computer player as well as piece behaviours. Are they only for TA tests?