/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. #ifndef GOALKEEPER_H
  21. #define GOALKEEPER_H
  22. #include <QtGui>
  23. #include "Player.h"
  24. class Pitch;
  25. class Team;
  26. class GoalKeeper : public Player
  27. {
  28. Q_OBJECT
  29. public:
  30. explicit GoalKeeper(QString name,
  31. int number,
  32. Pitch* pitch,
  33. Team* team,
  34. QColor hairColor,
  35. QColor skinColor);
  36. // goal keepers are players too
  37. enum { Type = UserType + 2 };
  38. int type() const
  39. { return Type;}
  40. public slots:
  41. void goalAttempt(Team* t, QPointF dest);
  42. public:
  43. void createPixmaps();
  44. void advance(int phase);
  45. void createMoves();
  46. void pixmapInsert(MWindow::Action a, QString s1, QString s2, QString s3, QRgb goalKeeperShirtColor, QRgb goalKeeperShortColor);
  47. private:
  48. void gkAdvanceWithBall();
  49. void gkAdvanceWithoutBall();
  50. };
  51. #endif // GOALKEEPER_H