File: PlayerBase.h

package info (click to toggle)
pentobi 26.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 4,068 kB
  • sloc: cpp: 25,986; javascript: 897; xml: 57; makefile: 13; sh: 11
file content (34 lines) | stat: -rw-r--r-- 1,056 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
//-----------------------------------------------------------------------------
/** @file libpentobi_base/PlayerBase.h
    @author Markus Enzenberger
    @copyright GNU General Public License version 3 or later */
//-----------------------------------------------------------------------------

#ifndef LIBPENTOBI_BASE_PLAYER_BASE_H
#define LIBPENTOBI_BASE_PLAYER_BASE_H

#include "Board.h"

namespace libpentobi_base {

//-----------------------------------------------------------------------------

class PlayerBase
{
public:
    virtual ~PlayerBase() = default;

    virtual Move genmove(const Board& bd, Color c) = 0;

    /** Check if the player wants to resign.
        This may only be called after a genmove() and returns true if the
        player wants to resign in the position at the last genmove().
        The default implementation returns false. */
    virtual bool resign() const;
};

//-----------------------------------------------------------------------------

} // namespace libpentobi_base

#endif // LIBPENTOBI_BASE_PLAYER_BASE_H