Prechádzať zdrojové kódy

corrected signature of actualPath

noath 7 rokov pred
rodič
commit
320ec21871
2 zmenil súbory, kde vykonal 2 pridanie a 2 odobranie
  1. 1 1
      unit.cpp
  2. 1 1
      unit.h

+ 1 - 1
unit.cpp

@@ -144,7 +144,7 @@ bool Unit::canMoveForDistance(int distance) {
 }
 
 bool Unit::canMoveToCell(Cell* to) {
-	if (to->isEmpty() && canMoveForDistance(to->actualPath.size())) {
+	if (to->isEmpty() && canMoveForDistance(getLocation()->actualPath(to).size())) {
 		return true;
 	}
 	else return false;

+ 1 - 1
unit.h

@@ -11,7 +11,7 @@ public:
 	bool isEmpty() {
 		return true;
 	}
-	std::vector <Cell*> actualPath() {
+	std::vector <Cell*> actualPath(Cell* to) {
 		std::vector <Cell*> path;
 		return path;
 	}