Closed wuto-chai closed 3 years ago
noticed that there is "synchronized" modifier in Knight's getCandidateMove but no in Archer's. Are we supposed to implement implicit lock for Knight and explicit lock for Archer? or can we add "synchronized" in Archer or delete it in Knight?
You can delete or add synchronized modifier as you wish. It doesn't matter.
synchronized
what about add it in other methods?
Yes you can add synchronized to other methods as well.
thanks!
noticed that there is "synchronized" modifier in Knight's getCandidateMove but no in Archer's. Are we supposed to implement implicit lock for Knight and explicit lock for Archer? or can we add "synchronized" in Archer or delete it in Knight?