selfmove.cpp 535 B

12345678910111213141516171819202122
  1. #include <cassert>
  2. #include "effects\selfmove.h"
  3. #include "cell.h"
  4. #include "units\unit.h"
  5. #include <string>
  6. void SelfMove::OperateOnCell(Cell* cell){
  7. throw std :: string("CAN'T TOUCH THIS");
  8. }
  9. void SelfMove::OperateOnUnit(Unit* unit){
  10. throw std :: string("CAN'T TOUCH THIS");
  11. }
  12. void SelfMove::OperateOnUnitToCell(Unit* unit, Cell* cell){
  13. unit->setLocation(cell);
  14. }
  15. void SelfMove::Execute(Cell* from, Cell* where, Unit* who, Unit* whom, TypeOfTrigger Type){
  16. if(Type == 1)
  17. OperateOnUnitToCell(who, where);
  18. }