wavelength 1.0.0
Loading...
Searching...
No Matches
gametrackselector.h
Go to the documentation of this file.
1#pragma once
2
3#include <vector>
4
6#include "game/player.h"
7#include "game/track.h"
9
19public:
30 GameTrackSelector(const std::vector<Track *> &tracks,
31 FreestyleTrack *pFreestyleTrack,
32 int nFreestyleType,
33 int nFreestyleInstrument);
34
43 bool IsFreestyleTrack(int nTrack) const;
44
53 void AddPlayer(Player *pPlayer, int nTrack);
54
62 int GetNumPlayers() const;
63
71 int GetNumTracks() const;
72
81 void EnterFreestyle(int nPlayer, bool bVictory);
82
91 void MovePlayer(int nPlayer, int nTrack);
92
102 void SetPlayerTrack(int nPlayer, int nTrack, bool bVictory);
103
111 void RotatePrevious(int nPlayer);
112
120 void RotateNext(int nPlayer);
121
130 int GetPlayerTrack(int nPlayer) const;
131
140 int GetPlayerSlot(int nPlayer) const;
141
153 void SwapPlayer(int nPlayer, int nTrack, int nSlot);
154
161 void Resync();
162
170 void RemovePlayer(int nPlayer);
171
179 void RefreshTrack(int nTrack);
180
181private:
182 TrackSelector mSelector;
183 std::vector<Player *> mPlayers;
184 std::vector<Track *> mTracks;
185 int mFreestyleType;
186 int mFreestyleInstrument;
187 int mHasFreestyle;
188};
Track the player plays freely with the analog sticks rather than by hitting gems.
Definition freestyletrack.h:19
void MovePlayer(int nPlayer, int nTrack)
Move a player to a track.
void RefreshTrack(int nTrack)
Show the players on a track.
void SetPlayerTrack(int nPlayer, int nTrack, bool bVictory)
Move a player to a track or off every track, and give each track its first player.
void EnterFreestyle(int nPlayer, bool bVictory)
Move a player to the freestyle track.
void SwapPlayer(int nPlayer, int nTrack, int nSlot)
Swap a player with the player in a slot of a track.
GameTrackSelector(const std::vector< Track * > &tracks, FreestyleTrack *pFreestyleTrack, int nFreestyleType, int nFreestyleInstrument)
Construct the assignment over the tracks of a song, with no players.
bool IsFreestyleTrack(int nTrack) const
Report whether a track is the freestyle track.
void Resync()
Give every player its track and every track its first player after a swap.
int GetNumPlayers() const
Report the number of players.
void RotateNext(int nPlayer)
Move a player to the next track, unless that is the last track.
void RotatePrevious(int nPlayer)
Move a player to the previous track, unless the player is on the first one.
int GetPlayerSlot(int nPlayer) const
Report the slot of a player on its track.
int GetPlayerTrack(int nPlayer) const
Report the track of a player.
void AddPlayer(Player *pPlayer, int nTrack)
Add a player on a track.
int GetNumTracks() const
Report the number of tracks, the freestyle track included.
void RemovePlayer(int nPlayer)
Remove a player from every track and hide its displays.
One participant in a song: the track the participant plays, the score, and the streak.
Definition player.h:19
Assignment of the players to the tracks and to the slots of each track, in the order the players arri...
Definition trackselector.h:11