Bladeren bron

fixed classes definition for Cell and Spells

noath 6 jaren geleden
bovenliggende
commit
f87cdbef63
2 gewijzigde bestanden met toevoegingen van 6 en 12 verwijderingen
  1. 2 8
      unit.cpp
  2. 4 4
      unit.h

+ 2 - 8
unit.cpp

@@ -4,8 +4,7 @@
 #include <cassert>
 #include <string>
 #include "unit.h"
-
-Unit::Unit() {}
+#include "AbstractFactory.h"
 
 int Unit::getCost(){
 	return cost_;
@@ -201,9 +200,4 @@ void Unit::moveToCell(Cell* destination) {
 		setMovementSpeed(decreasedValue);
 		setLocation(destination);
 	}
-}
-
-int main() {
-	std::cout << "Hello, world!\n";
-}
-
+}

+ 4 - 4
unit.h

@@ -1,14 +1,14 @@
 #pragma once
 #include <iostream>
 #include <vector>
+#include "AbstractFactory.h"
 
-class Spell {
-	//waiting
-};
+class Spell;	
 class Cell {
 	//waiting for a realisation
 public:
-	bool isEmpty() {
+	//must be in cell.h
+	bool isEmpty() { 
 		return true;
 	}
 	std::vector <Cell*> actualPath(Cell* destination) { //the shortest existing path from (*this) to (*destination)