Commit 638a9830 authored by Frederik Schwarzer's avatar Frederik Schwarzer

Use C++ time instead of C time.

parent d34ff9b9
......@@ -12,7 +12,6 @@
#include <utility>
#include <stdlib.h>
#include <time.h>
#define KSIRTET
......
......@@ -8,7 +8,7 @@
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
***************************************************************************/
#include <time.h>
#include <ctime>
#include <string>
#include <vector>
......@@ -66,7 +66,7 @@ int gameDesktopMode(const QApplication &app)
{
// Desktop User Mode
mpKBlocksGameLogic = new KBlocksGameLogic(2);
mpKBlocksGameLogic->setGameSeed(time(0));
mpKBlocksGameLogic->setGameSeed(std::time(nullptr));
mpKBlocksGameLogic->setGamePunish(true);
mpKBlocksGameLogic->setGameStandbyMode(true);
mpKBlocksGameLogic->setInitInterval(500);
......@@ -118,7 +118,7 @@ int gameEngineMode(KBlocksConfigManager *config)
printf("\tHas Human = %s\n", hasHuman ? "true" : "false");
printf("\tSpeed Limit = %s\n", sendLimit ? "true" : "false");
mpKBlocksGameLogic = new KBlocksGameLogic(gameCount, true);
mpKBlocksGameLogic->setGameSeed(sameSeq ? time(0) : -time(0));
mpKBlocksGameLogic->setGameSeed(sameSeq ? std::time(nullptr) : -std::time(nullptr));
mpKBlocksGameLogic->setGamePunish(hasAttack);
mpKBlocksGameLogic->setGameStandbyMode(standbyMode);
mpKBlocksGameLogic->setInitInterval(hasHuman ? 500 : 0);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment