forked from jaildesigner-jailgames/jaildoctors_dilemma
Limpieza y organización de código
This commit is contained in:
@@ -24,48 +24,12 @@ ScoreBoard::ScoreBoard(SDL_Renderer *renderer, Asset *asset, board_t *board)
|
||||
timePaused = 0;
|
||||
totalTimePaused = 0;
|
||||
|
||||
// Inicializa los colores
|
||||
color_t c = stringToColor("blue");
|
||||
color.push_back(c);
|
||||
|
||||
// c = stringToColor("red");
|
||||
// color.push_back(c);
|
||||
|
||||
c = stringToColor("magenta");
|
||||
color.push_back(c);
|
||||
|
||||
c = stringToColor("green");
|
||||
color.push_back(c);
|
||||
|
||||
c = stringToColor("cyan");
|
||||
color.push_back(c);
|
||||
|
||||
c = stringToColor("yellow");
|
||||
color.push_back(c);
|
||||
|
||||
c = stringToColor("white");
|
||||
color.push_back(c);
|
||||
|
||||
c = stringToColor("bright_blue");
|
||||
color.push_back(c);
|
||||
|
||||
// c = stringToColor("bright_red");
|
||||
// color.push_back(c);
|
||||
|
||||
c = stringToColor("bright_magenta");
|
||||
color.push_back(c);
|
||||
|
||||
c = stringToColor("bright_green");
|
||||
color.push_back(c);
|
||||
|
||||
c = stringToColor("bright_cyan");
|
||||
color.push_back(c);
|
||||
|
||||
c = stringToColor("bright_yellow");
|
||||
color.push_back(c);
|
||||
|
||||
c = stringToColor("bright_white");
|
||||
color.push_back(c);
|
||||
// Inicializa el vector de colores
|
||||
const std::vector<std::string> vColors = {"blue", "magenta", "green", "cyan", "yellow", "white", "bright_blue", "bright_magenta", "bright_green", "bright_cyan", "bright_yellow", "bright_white"};
|
||||
for (auto v : vColors)
|
||||
{
|
||||
color.push_back(stringToColor(v));
|
||||
}
|
||||
}
|
||||
|
||||
// Destructor
|
||||
@@ -133,7 +97,7 @@ void ScoreBoard::update()
|
||||
sprite->update();
|
||||
|
||||
if (!paused)
|
||||
{// Si está en pausa no se actualiza el reloj
|
||||
{ // Si está en pausa no se actualiza el reloj
|
||||
clock = getTime();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user