diff options
-rw-r--r-- | src/creature.cpp | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/creature.cpp b/src/creature.cpp index cc3fa08..2e5e1ab 100644 --- a/src/creature.cpp +++ b/src/creature.cpp @@ -49,6 +49,36 @@ void Creature::Action() else x--; } + else if(x<xT) + { + if(y<yT) + { + x++; + y++; + } + else + { + x++; + y--; + } + } + else if (x>xT) + { + if(y<yT) + { + x--; + y++; + } + else + { + x--; + y--; + } + } + + + + /* else { int z = rand()%2; @@ -67,6 +97,7 @@ void Creature::Action() y--; } } + */ } Location Creature::getLocation() |