CastleLab / COMP3021-2020Fall-PA3-Student-Version

HKUST - COMP3021 - 2020Fall - Programming Assignment 3 - Student Version
https://course.cse.ust.hk/comp3021/
Apache License 2.0
1 stars 0 forks source link

Computer Player strategy and piece behaviour #33

Closed Kelvinluk827 closed 3 years ago

Kelvinluk827 commented 3 years ago

Is that in running the game, user cannot select a smart computer player as well as piece behaviours. Are they only for TA tests?

Kelvinluk827 commented 3 years ago

As I have seen no mutators for behaviour of piece

Troublor commented 3 years ago

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.

Kelvinluk827 commented 3 years ago

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?

Troublor commented 3 years ago

The behaviours of pieces are settled when they are constructed. So you also need to change the way you construct those pieces.

Kelvinluk827 commented 3 years ago

Ok thank you very much!