Преглед на файлове

corrected signature of actualPath

noath преди 7 години
родител
ревизия
320ec21871
променени са 2 файла, в които са добавени 2 реда и са изтрити 2 реда
  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;
 	}