Chess
Classes
engine.h File Reference

Contains main game loop and turn handling. More...

#include "agent.h"
#include "chessboard.h"
Include dependency graph for engine.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  Engine
 Contains main game loop and turn handling. More...
 

Detailed Description

Contains main game loop and turn handling.

The engine class holds the game loop. This is what controls who moves what piece, where they move it to, and when they are able to move it. This is done by ither calling agent.find_best_move() to get the AI's best move, or allowing the user to make a move by handling an SDLMouseEvent (mouse click on the screen). This class also controls what is drawn to the screen using member functions within the Graphics class. The chessboard is redrawn every time a valid move or click is made.