Chess Game or Checkers Script C++

I’m a student and I need some advice about scripting chess or checkers game - It’s my Final Exam Game and I need some help. I don’t know where to start - The code must be in C++ and I need to create the graphic mode to get extra points. I’ll take any kind of help :] Game needs to have an AI to play with computer player.
I’ve found something googling the topic but I want more data to optimize game.

You can use an 8x8 2D-array as the board.

Each type of piece is a different class, though the Queen could inherit from the king (same movement pattern, but scaled distance).

Movement on the board is done with a method adding/substracting from the indizes (typically i and j), e.g. the knight can only move from his current position by adding a variation of +/-2 on one indice, and +/-1 on the other. So he could move from [4][6] to either [2][7], [2][5], [6][7], [6][5], [3][8], [3][4], [5][8] or [5][4]. You then need a method to check each position, whether there already is a figure, and whether it is an ally or enemy. If its an ally you cannot move there, if its an enemy you can remove it from the board (another method). That’s nearly all there is to chess (except switching the king’s and tower’s position).

As Input you can simply ask for the new indices in the console, or use something like SFML, if its allowed.

Graphicwise you won’t come far with the console alone though.

Privacy & Terms