void StudentWorld::setDisplayText() { int score = getScore(); int round = roundNumber(); double energyPercent = (double(m_player->currentEnergy()/50)*100); int torpedoes = m_player->numberOfTorpedoes(); int shipsLeft = getLives(); std::string s = FormatGameStatText(score, round, energyPercent, torpedoes, shipsLeft); setGameStatText(s); }
void StudentWorld::updateDisplayText() { int score = getScore(); int round = getRoundNumber(); double energyPercent = ptrToShip->getEnergyPct(); int torpedos = ptrToShip->getNumTorpedos(); int shipsLeft = getLives(); string s = formatDisplay(score, round, energyPercent, torpedos, shipsLeft); setGameStatText(s); }