mercredi 14 mars 2018

OOPS Chess game: Design logic once a player moves a peice

If was thinking designing chess game using OOPS principle.I am not able to think how use cases after moving a piece should be handled. As we now when a player moves his piece from One spot to another.Few think can happen. like pawn may reach in last row new piece will be on board instead of that pawn or there can be check on opponent or this check can be check mate too.so how these cases should be handled? on which class should these logic be?does chain responsibility design pattern suit better here?

Aucun commentaire:

Enregistrer un commentaire