Definition at line 9 of file Goal.h.
Public Member Functions | |
| bool | isSatisfy (const Cube *model) const |
| bool | isWrong (const Cube *model) const |
| Return whether goal cannot by solved any more. | |
| bool | shouldGoOut () const |
Static Public Member Functions | |
| static Goal | noGoal () |
| static Goal | outGoal () |
| static Goal | escapeGoal () |
| static Goal | aliveGoal () |
|
|
Definition at line 39 of file Goal.cpp. 00040 {
00041 return Goal(SATISFY_IGNORE, SATISFY_TRUE);
00042 }
|
|
|
Definition at line 33 of file Goal.cpp. 00034 {
00035 return Goal(SATISFY_TRUE, SATISFY_TRUE);
00036 }
|
|
|
Definition at line 45 of file Goal.cpp. 00046 {
00047 bool result = true;
00048 if (SATISFY_TRUE == m_out) {
00049 result &= model->isOut();
00050 }
00051 else if (SATISFY_FALSE == m_out) {
00052 result &= (!model->isOut());
00053 }
00054
00055 if (SATISFY_TRUE == m_alive) {
00056 result &= model->isAlive();
00057 }
00058 else if (SATISFY_FALSE == m_alive) {
00059 result &= (!model->isAlive());
00060 }
00061
00062 return result;
00063 }
|
|
|
Return whether goal cannot by solved any more. Dead fish cannot be revived. Object out of room cannot go back. Definition at line 71 of file Goal.cpp. 00072 {
00073 bool wrong = false;
00074 if (SATISFY_TRUE == m_alive) {
00075 wrong |= !model->isAlive();
00076 }
00077
00078 if (SATISFY_FALSE == m_out) {
00079 wrong |= model->isOut();
00080 }
00081 return wrong;
00082 }
|
|
|
Definition at line 21 of file Goal.cpp. 00022 {
00023 return Goal(SATISFY_IGNORE, SATISFY_IGNORE);
00024 }
|
|
|
Definition at line 27 of file Goal.cpp. 00028 {
00029 return Goal(SATISFY_TRUE, SATISFY_IGNORE);
00030 }
|
|
|
Definition at line 85 of file Goal.cpp. 00086 {
00087 return SATISFY_TRUE == m_out;
00088 }
|
1.4.2