1 // Copyright (C) 2004 John Farrell
2 // Copyright (C) 2005 Ulf Lorenz
4 // This program is free software; you can redistribute it and/or modify
5 // it under the terms of the GNU General Public License as published by
6 // the Free Software Foundation; either version 3 of the License, or
7 // (at your option) any later version.
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU Library General Public License for more details.
14 // You should have received a copy of the GNU General Public License
15 // along with this program; if not, write to the Free Software
16 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
20 #include "MoveResult.h"
27 #define debug(x) {cerr<<__FILE__<<": "<<__LINE__<<": "<<x<<flush<<endl;}
30 MoveResult::MoveResult()
31 : d_fight(false), d_stepCount(0), d_out_of_moves(false),
32 d_reached_end(false), d_treachery(false), d_considered_treachery(false),
33 d_too_large_stack_in_the_way(false), d_fightResult(Fight::DRAW)
37 MoveResult::~MoveResult()
41 void MoveResult::fillData(Stack *s, int stepCount)
43 if (s->getPath()->size() == 0)
46 if (s->enoughMoves() == false)
47 d_out_of_moves = true;
49 d_stepCount = stepCount;
52 void MoveResult::setFightResult(Fight::Result fightResult)
55 d_fightResult = fightResult;