-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMelodyPlayer.h
37 lines (30 loc) · 1.03 KB
/
MelodyPlayer.h
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
/*
melody.h - a class to play various melodies (inspired by the original Super Mario Bros).
*/
#ifndef MELODYPLAYER_H
#define MELODYPLAYER_H
class MelodyPlayer
{
public:
MelodyPlayer();
void playTone(int, int);
void playWinningMelody(int);
void playLosingMelody();
void playEasterEggMelody();
void playFireworks(int);
private:
void playMelody(const int[], const int[], const int, const int);
static const int losingMelodyTempo;
static const int losingMelodyLength;
static const int losingMelodyTones[14];
static const int losingMelodyBeats[14];
static const int winningMelodyTempo;
static const int winningMelodyLength;
static const int winningMelodyTones[27];
static const int winningMelodyBeats[27];
static const int easterEggMelodyTempo;
static const int easterEggMelodyLength;
static const int easterEggMelodyTones[13];
static const int easterEggMelodyBeats[13];
};
#endif