Is implementing state pattern a good design choice for simple chess game?

bubykung

New Member
I am trying to write an offline no AI no GUI synchronized command-line chess game that two users play (or one user play both white & black). That means there's only 1 thread.The chess game includes special movement {capture, en passant, promotion, castling, checkmate, stalemate}The user interact with the game by stating the start position and end position. e.g. e1 g1. That's it, in one line.I am trying to take the full privilege of object-oriented design. But just for the sake of this requirement. Does implementing state pattern worth it? Since the user only input the command and the game should not ask the user to make any other decision after it.Edit: I apologize for not making this clear. What I was confused of is whether to implement the state at the game control level like this image:
IoEX4.gif
or the game piece level like this image:
ZTAh3.png
 
Back
Top