|
@@ -1,24 +1,21 @@
|
|
|
-#include "Cell.h"
|
|
|
+#include "../include/Cell.h"
|
|
|
#include <assert.h>
|
|
|
#include <string>
|
|
|
#include <string.h>
|
|
|
-//#include "unit.h"
|
|
|
+/*
|
|
|
+ * ????? ??????? ??? ???? ? ?????????? ?????????? ????
|
|
|
+ */
|
|
|
+//#include "../include/units/unit.h"
|
|
|
+class Unit{
|
|
|
+public:
|
|
|
+ bool canMoveForDistance(int);
|
|
|
+ bool canAttackForDistance(std::string, int);
|
|
|
+};
|
|
|
#include <queue>
|
|
|
#include <vector>
|
|
|
#include <map>
|
|
|
#include <iostream>
|
|
|
|
|
|
-class Unit{
|
|
|
-private:
|
|
|
-public:
|
|
|
- bool CanMoveForDistance(int distance){
|
|
|
- return true;
|
|
|
- }
|
|
|
- bool CanAttackForDistance(std::string AttackType, int distance){
|
|
|
- return true;
|
|
|
- }
|
|
|
-};
|
|
|
-
|
|
|
class EffectsForCell{
|
|
|
public:
|
|
|
void OperateOnCell(Cell*){}
|
|
@@ -215,12 +212,12 @@ void Cell::clearTable_() {
|
|
|
void Cell::recalcAttackable_(Cell * Now,bool isReached){
|
|
|
if(Now == nullptr)return;
|
|
|
if (!isEmpty() && !Now->isEmpty() &&
|
|
|
- getCharacter()->CanAttackForDistance("Melee", Now->getdistance_barrier())
|
|
|
+ getCharacter()->canAttackForDistance("Melee", Now->getdistance_barrier())
|
|
|
) {
|
|
|
Now->setisMeleeAttackAble(isReached);
|
|
|
}
|
|
|
if (!isEmpty() && !Now->isEmpty() &&
|
|
|
- getCharacter()->CanAttackForDistance("Range", Now->getdistance_barrier())
|
|
|
+ getCharacter()->canAttackForDistance("Range", Now->getdistance_barrier())
|
|
|
) {
|
|
|
Now->setisRangeAttackAble(true);
|
|
|
}
|
|
@@ -229,7 +226,7 @@ void Cell::recalcAttackable_(Cell * Now,bool isReached){
|
|
|
void Cell::recalcMoveable_(Cell * Now, bool isReached){
|
|
|
if(Now == nullptr || Now->isEmpty() || isEmpty())return;
|
|
|
if(!isEmpty() && Now->isEmpty() &&
|
|
|
- getCharacter()->CanMoveForDistance(Now->getdistance_barrier())){
|
|
|
+ getCharacter()->canMoveForDistance(Now->getdistance_barrier())){
|
|
|
Now->setisMoveAble(isReached);
|
|
|
}
|
|
|
}
|
|
@@ -287,10 +284,6 @@ void Cell::updateUnMovealeCells_(std::queue<Cell*> & Q) {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-void Cell::print() {
|
|
|
- std::cout << "(" << col_ << ", " << row_ << ")";
|
|
|
-}
|
|
|
-
|
|
|
Cell* Cell::getRealShootTarget(Cell* next){
|
|
|
if(next == this){
|
|
|
return next;
|
|
@@ -339,4 +332,6 @@ Cell* Cell::getRealShootTarget(Cell* next){
|
|
|
if(next_row < row_main_diag)return getrightDown();
|
|
|
return getright();
|
|
|
}
|
|
|
-}
|
|
|
+}
|
|
|
+
|
|
|
+int main(){}
|