-
Notifications
You must be signed in to change notification settings - Fork 0
/
clock.h
64 lines (50 loc) · 1.46 KB
/
clock.h
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
/**Roseline Okpara, Andrew Clark
*
* $Id: clock.h,v 1.2 2013/04/16 22:38:42 p334-01m Exp $
*
* $Log: clock.h,v $
* Revision 1.2 2013/04/16 22:38:42 p334-01m
* made new changes. Outputs correctly. Finished part 2
*
* Revision 1.1 2013/04/12 19:14:24 p334-01m
* Initial revision
*
**/
#ifndef CLOCK_H
#define CLOCK_H
#include "Solver.h"
using namespace std;
class Clock {
public:
/// Name: (constructor)
/// Arguments: hours, inTime, goalTime
/// Description: constructor for the class
Clock(const int clkHours, int inTime, const int goalTime);
/// Name: (getChildren)
/// Arguments: curState
/// Description: Generates the configurations
vector<int> getChildren(int curState);
/// Name: (initState)
/// Arguments: none
/// Description: Returns the initial time
int initState();
/// Name: (isGoal)
/// Arguments: none
/// Description: If current time is goal time, returns true;
/// else returns false
bool isGoal(int config);
/// Name: (getGoal)
/// Arguments: none
/// Description: Returns the goal time
int getGoal();
/// Name: (printPath)
/// Arguments: path
/// Description: Prints the path to standard output in human
/// readable form
void printPath(stack<int> path);
private: ///private members
const int clkHours_; //number of hours on the clock
int initTime_; //initial time on our clock
const int theGoal; // goal time
};
#endif