Fixes for datatype size on amd64.
[crack-attack.git] / src / ComputerPlayerAI.h
blob51b7d8122d687d4a7996cb27383e025010c6bfed
1 /*
2 * ComputerPlayerAI.h
3 * Andrew Sayman - 3/27/05
5 * Copyright (C) 2005 Andrew Sayman
6 * Copyright (C) 2005 Kevin Webb
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version 2
11 * of the License, or (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
23 #ifndef cpai_h_
24 #define cpai_h_
26 #include "GarbageQueue.h"
28 class GarbageQueue;
30 class ComputerPlayerAI {
31 private:
32 int last_time;
33 int last_shatter_height;
35 protected:
36 enum AI_STATE { AI_WAITING, AI_SHATTERING } state;
37 GarbageQueue *queue;
39 virtual int baseSteps();
40 virtual int stateSteps();
41 virtual int garbageShatterDelay ( );
43 virtual void shatter();
45 public:
47 ComputerPlayerAI();
48 virtual ~ComputerPlayerAI(){}
50 int alarm ( );
51 void resetAlarm ( );
52 GarbageQueue *garbageQueue ( );
53 virtual GarbageQueue *garbageAmount ( );
55 virtual bool determineLoss ( );
56 virtual int lossHeight();
59 class EasyAI :public ComputerPlayerAI {
60 public:
61 EasyAI() { }
62 virtual ~EasyAI(){}
64 virtual int lossHeight();
65 protected:
66 virtual int baseSteps();
69 class MediumAI :public ComputerPlayerAI {
70 public:
71 MediumAI(){}
72 virtual ~MediumAI(){}
74 virtual int lossHeight();
75 protected:
76 virtual int baseSteps();
79 class HardAI :public ComputerPlayerAI {
80 public:
81 HardAI(){}
82 virtual ~HardAI(){}
84 virtual int lossHeight();
85 protected:
86 virtual int baseSteps();
90 #endif