|
@@ -76,7 +76,12 @@ bool Spell::getForCell(){
|
|
|
void Spell::setForCell(bool value){
|
|
|
forCell_ = value;
|
|
|
}
|
|
|
-bool Spell::canCastToCell(Cell* destination, Cell* from){
|
|
|
- //if(from -> lenOfActualPath(destination) == 1) return true;
|
|
|
- return false;
|
|
|
+
|
|
|
+bool Spell::isNeirbor(Cell* destination, Cell* from){
|
|
|
+ return from -> getleft() == destination ||
|
|
|
+ from -> getleftDown() == destination ||
|
|
|
+ from -> getleftUp() == destination ||
|
|
|
+ from -> getright() == destination ||
|
|
|
+ from -> getrightDown() == destination ||
|
|
|
+ from -> getrightUp() == destination;
|
|
|
}
|