new 4475edb243ed4627f4c5f2c470ca40b3def034d4
[tagua/yd.git] / src / core / statefactory.h
blob0bfea7254c20339b9ff1b75a459b7589c8c8319d
1 /*
2 Copyright (c) 2007 Paolo Capriotti <p.capriotti@gmail.com>
3 (c) 2007 Maurizio Monge <maurizio.monge@kdemail.net>
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
9 */
11 #ifndef CORE__STATE_FACTORY_H
12 #define CORE__STATE_FACTORY_H
14 #include "export.h"
16 class IState;
18 class TAGUA_EXPORT IStateFactory {
19 public:
20 virtual ~IStateFactory();
22 /**
23 * Create an empty state for this game. An empty state
24 * is usually a board with no pieces, empty pools and
25 * flags in their default values.
26 * An empty state is generally not the initial state for
27 * a game.
29 * To get the initial state, call reset on an
30 * empty state.
32 * @return The newly created state.
33 * @sa IState::reset
35 virtual IState* createState() const = 0;
38 #endif // CORE__STATE_FACTORY_H