Amazon interview question

Develop a chess game solution