home
·
contact
·
privacy
projects
/
plomrogue
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c1a11c8
)
Re-seed rrand() with a new but predictable seed each new turn.
author
Christian Heller
<c.heller@plomlompom.de>
Wed, 29 May 2013 03:17:14 +0000
(
05:17
+0200)
committer
Christian Heller
<c.heller@plomlompom.de>
Wed, 29 May 2013 03:17:14 +0000
(
05:17
+0200)
roguelike.c
patch
|
blob
|
history
diff --git
a/roguelike.c
b/roguelike.c
index 0de96ee87ede95cd6018b7873e3a9aa1b77e2529..6217fec2713128b4b4987c52f5f34e841da66078 100644
(file)
--- a/
roguelike.c
+++ b/
roguelike.c
@@
-134,6
+134,7
@@
void map_scroll (struct Map * map, char dir) {
void next_turn (struct World * world) {
// Increment turn and move enemy.
world->turn++;
+ rrand(1, world->seed * world->turn);
char d = rrand(0, 0) % 5;
uint16_t ty = world->monster->y;
uint16_t tx = world->monster->x;