projects
/
TDDC76_proj.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3da2597
)
fixed random seed
author
lukel495
<lukel495@su00-102.ad.liu.se>
Thu, 23 Nov 2023 10:48:00 +0000
(11:48 +0100)
committer
lukel495
<lukel495@su00-102.ad.liu.se>
Thu, 23 Nov 2023 10:48:00 +0000
(11:48 +0100)
src/_main.cc
patch
|
blob
|
history
diff --git
a/src/_main.cc
b/src/_main.cc
index 0808a0581707a9d760f92ce1e618a861e68a70ce..913a5bbfc158e4e71b13586d69259739d1e2d64c 100644
(file)
--- a/
src/_main.cc
+++ b/
src/_main.cc
@@
-7,6
+7,7
@@
#include <SFML/Graphics.hpp>
#include <iostream>
#include <memory>
+#include <random>
#include "constants.h"
#include "States.h"
@@
-50,6
+51,8
@@
int main ()
game_context.current_state.release();
game_context.current_state = std::move(game_context.next_state);
game_context.next_state = nullptr;
+
+ srand(game_clock.getElapsedTime().asMicroseconds());
}
//Draw