~ubuntu-branches/ubuntu/vivid/peg-solitaire/vivid

« back to all changes in this revision

Viewing changes to scr/moviment.h

  • Committer: Bazaar Package Importer
  • Author(s): Innocent De Marchi
  • Date: 2011-01-18 18:06:54 UTC
  • Revision ID: james.westby@ubuntu.com-20110118180654-w1yj9he00r65fvxh
Tags: upstream-1.0.2
ImportĀ upstreamĀ versionĀ 1.0.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/***********************************************************************
 
2
 *
 
3
 * Copyright (C) 2010 Innocent De Marchi <tangram.peces@gmail.com>
 
4
 *
 
5
 * This program is free software: you can redistribute it and/or modify
 
6
 * it under the terms of the GNU General Public License as published by
 
7
 * the Free Software Foundation, either version 3 of the License, or
 
8
 * (at your option) any later version.
 
9
 *
 
10
 * This program is distributed in the hope that it will be useful,
 
11
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
12
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
13
 * GNU General Public License for more details.
 
14
 *
 
15
 * You should have received a copy of the GNU General Public License
 
16
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
17
 *
 
18
 ***********************************************************************/
 
19
#ifndef MOVIMENT_H
 
20
#define MOVIMENT_H
 
21
 
 
22
#include <QUndoCommand>
 
23
 
 
24
class Tauler;
 
25
class Fitxa;
 
26
 
 
27
class Moviment : public QUndoCommand
 
28
{
 
29
public:
 
30
    Moviment(int fitxaInicial, int fitxaBotada, int fitxaFinal, int direccioMoviment, Tauler *taulerJoc);
 
31
 
 
32
 
 
33
        virtual void  redo();// moviment Endevant;
 
34
        virtual void undo(); //moviment Enrrera;
 
35
 
 
36
 void fesMoviment(int primera, int segona, int tercera);
 
37
 
 
38
 void eliminaFitxesVermelles();
 
39
 
 
40
 
 
41
 QString movimentACoordenades();
 
42
 
 
43
private:
 
44
    int p_fitxaInicial;
 
45
    int p_fitxaBotada;
 
46
    int p_fitxaFinal;
 
47
    int p_direccioMoviment;
 
48
    Tauler *p_taulerJoc;
 
49
};
 
50
 
 
51
#endif // MOVIMENT_H