mirror of
https://github.com/caperren/school_archives.git
synced 2025-11-09 13:41:13 +00:00
51 lines
930 B
C++
51 lines
930 B
C++
/*
|
|
* MinimaxPlayer.h
|
|
*
|
|
* Created on: Apr 17, 2015
|
|
* Author: wong
|
|
*/
|
|
|
|
#ifndef MINIMAXPLAYER_H
|
|
#define MINIMAXPLAYER_H
|
|
|
|
#include "OthelloBoard.h"
|
|
#include "Player.h"
|
|
#include <vector>
|
|
|
|
/**
|
|
* This class represents an AI player that uses the Minimax algorithm to play the game
|
|
* intelligently.
|
|
*/
|
|
class MinimaxPlayer : public Player {
|
|
public:
|
|
|
|
/**
|
|
* @param symb This is the symbol for the minimax player's pieces
|
|
*/
|
|
MinimaxPlayer(char symb);
|
|
|
|
/**
|
|
* Destructor
|
|
*/
|
|
virtual ~MinimaxPlayer();
|
|
|
|
/**
|
|
* @param b The board object for the current state of the board
|
|
* @param col Holds the return value for the column of the move
|
|
* @param row Holds the return value for the row of the move
|
|
*/
|
|
void get_move(OthelloBoard* b, int& col, int& row);
|
|
|
|
/**
|
|
* @return A copy of the MinimaxPlayer object
|
|
* This is a virtual copy constructor
|
|
*/
|
|
MinimaxPlayer* clone();
|
|
|
|
private:
|
|
|
|
};
|
|
|
|
|
|
#endif
|