forked from holderlb/wumpus-world-simulator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Percept.cc
63 lines (56 loc) · 1.12 KB
/
Percept.cc
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
// Percept.cc
#include <iostream>
#include "Percept.h"
Percept::Percept ()
{
Stench = false;
Breeze = false;
Glitter = false;
Bump = false;
Scream = false;
}
Percept::Percept (bool stench, bool breeze, bool glitter, bool bump, bool scream)
{
Stench = stench;
Breeze = breeze;
Glitter = glitter;
Bump = bump;
Scream = scream;
}
Percept::Percept (const Percept& percept)
{
Stench = percept.Stench;
Breeze = percept.Breeze;
Glitter = percept.Glitter;
Bump = percept.Bump;
Scream = percept.Scream;
}
Percept& Percept::operator= (const Percept& percept)
{
if (this == &percept)
{
return *this;
}
Stench = percept.Stench;
Breeze = percept.Breeze;
Glitter = percept.Glitter;
Bump = percept.Bump;
Scream = percept.Scream;
return *this;
}
void Percept::SetPercept (bool stench, bool breeze, bool glitter, bool bump, bool scream)
{
Stench = stench;
Breeze = breeze;
Glitter = glitter;
Bump = bump;
Scream = scream;
}
void Percept::Print ()
{
cout << "[Stench=" << Stench << ","
<< "Breeze=" << Breeze << ","
<< "Glitter=" << Glitter << ","
<< "Bump=" << Bump << ","
<< "Scream=" << Scream << "]" << endl;
}