PageRenderTime 12ms CodeModel.GetById 7ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 0ms

/goalkeeper.h

http://cutefootball.googlecode.com/
C++ Header | 61 lines | 31 code | 10 blank | 20 comment | 0 complexity | 4ffe111f8a515790c716460113f2fbe6 MD5 | raw file
 1/*
 2 * Copyright 2010,2011 Timothy Rochford
 3 *
 4 *    This file is part of CuteFootball.
 5 *
 6 *    CuteFootball is free software: you can redistribute it and/or modify
 7 *    it under the terms of the Lesser GNU General Public License as published by
 8 *    the Free Software Foundation, either version 3 of the License, or
 9 *    (at your option) any later version.
10 *
11 *    CuteFootball is distributed in the hope that it will be useful,
12 *    but WITHOUT ANY WARRANTY; without even the implied warranty of
13 *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 *    Lesser  GNU General Public License for more details.
15 *
16 *    You should have received a copy of the Lesser GNU General Public License
17 *    along with CuteFootball.  If not, see <http://www.gnu.org/licenses/>.
18 *
19 */
20
21#ifndef GOALKEEPER_H
22#define GOALKEEPER_H
23
24#include <QtGui>
25
26#include "Player.h"
27
28class Pitch;
29class Team;
30
31class GoalKeeper : public Player
32{
33    Q_OBJECT
34public:
35    explicit GoalKeeper(QString name,
36                        int number,
37                        Pitch* pitch,
38                        Team* team,
39                        QColor hairColor,
40                        QColor skinColor);
41
42    // goal keepers are players too
43    enum { Type = UserType + 2 };
44    int type() const
45        { return Type;}
46
47public slots:
48    void goalAttempt(Team* t, QPointF dest);
49
50public:
51    void createPixmaps();
52    void advance(int phase);
53    void createMoves();
54    void pixmapInsert(MWindow::Action a, QString s1, QString s2, QString s3, QRgb goalKeeperShirtColor, QRgb goalKeeperShortColor);
55
56private:
57    void gkAdvanceWithBall();
58    void gkAdvanceWithoutBall();
59};
60
61#endif // GOALKEEPER_H