File: solution.hh

package info (click to toggle)
xmahjongg 3.5-2
  • links: PTS
  • area: main
  • in suites: woody
  • size: 1,060 kB
  • ctags: 1,317
  • sloc: cpp: 5,619; ansic: 3,451; sh: 330; makefile: 162
file content (37 lines) | stat: -rw-r--r-- 542 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#ifndef SOLUTION_HH
#define SOLUTION_HH
#include "alarm.hh"
class Game;
class Board;
class Panel;

class SolutionDisplay: public AlarmHooks {
  
  Game *_game;
  Board *_board;
  
  bool _on;
  int _pos;
  Alarm _alarm;
  int _state;
  int _time_scale;

  void real_turn_off();

  Moment delay(long) const;
  
 public:
  
  SolutionDisplay(Game *, Board *);
  
  bool on() const			{ return _on; }
  
  bool turn_on(Panel *);
  void turn_off()			{ if (_on) real_turn_off(); }
  void change_speed(bool faster);
  
  void alarm();
  
};

#endif