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

About Piece CAPTURING behaviour #12

Open leiyi777 opened 3 years ago

leiyi777 commented 3 years ago

In the statement, it says that the piece prefers moves that capture more enemies.

 * - {@link Behavior#CAPTURING}: prefer the moves that captures the enemies, killing the more, the better.
 *                               when there are many pieces that can captures, randomly select one of them

However, a piece can capture at most one enemy in each move, so how comes it prefers the moves that capture more enemies? So is it mean that we only need to randomly select one of the moves that capturing enemies?

Troublor commented 3 years ago

You are right. CAPTURING behaviour prefers the move which captures enemy's piece. In the case where there are multiple such moves, randomly pick one is enough.

lky-bulbasaur commented 3 years ago

I want to ask another question about CAPTURING behaviour. If there are no enemy pieces for this piece to capture (e.g. the number of rounds is still <= numMovesProtection), do we simply randomly select a move?

Troublor commented 3 years ago

@lky-bulbasaur Yes, you can do that. In the TA-only tests, we will not test such cases.

zcmiyano commented 3 years ago

If there is no enemy to capture at all and num_move > numMovesProtection, can we randomly select a move?

Troublor commented 3 years ago

If there is no enemy to capture at all and num_move > numMovesProtection, can we randomly select a move?

Yes of course