projects
/
rocksndiamonds.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
172a34e
)
changed variable name
author
Holger Schemel
<info@artsoft.org>
Wed, 10 Oct 2018 19:11:08 +0000
(21:11 +0200)
committer
Holger Schemel
<info@artsoft.org>
Wed, 10 Oct 2018 19:11:08 +0000
(21:11 +0200)
src/game.c
patch
|
blob
|
history
diff --git
a/src/game.c
b/src/game.c
index fdb77eb3e9e2a139200e2d6d4741f9455b4603e6..3255b4280abc8bc74978e66cd36df44bb07fea33 100644
(file)
--- a/
src/game.c
+++ b/
src/game.c
@@
-8917,7
+8917,7
@@
static void Life(int ax, int ay)
{
int xx = ax+x1, yy = ay+y1;
int old_element = Feld[xx][yy];
{
int xx = ax+x1, yy = ay+y1;
int old_element = Feld[xx][yy];
- int n
achbarn
= 0;
+ int n
um_neighbours
= 0;
if (!IN_LEV_FIELD(xx, yy))
continue;
if (!IN_LEV_FIELD(xx, yy))
continue;
@@
-8933,13
+8933,13
@@
static void Life(int ax, int ay)
(element == EL_GAME_OF_LIFE && IS_PLAYER(x, y))) &&
!Stop[x][y]) ||
(IS_FREE(x, y) && Stop[x][y]))
(element == EL_GAME_OF_LIFE && IS_PLAYER(x, y))) &&
!Stop[x][y]) ||
(IS_FREE(x, y) && Stop[x][y]))
- n
achbarn
++;
+ n
um_neighbours
++;
}
if (xx == ax && yy == ay) /* field in the middle */
{
}
if (xx == ax && yy == ay) /* field in the middle */
{
- if (n
achbarn
< life_parameter[0] ||
- n
achbarn
> life_parameter[1])
+ if (n
um_neighbours
< life_parameter[0] ||
+ n
um_neighbours
> life_parameter[1])
{
Feld[xx][yy] = EL_EMPTY;
if (Feld[xx][yy] != old_element)
{
Feld[xx][yy] = EL_EMPTY;
if (Feld[xx][yy] != old_element)
@@
-8950,8
+8950,8
@@
static void Life(int ax, int ay)
}
else if (IS_FREE(xx, yy) || CAN_GROW_INTO(Feld[xx][yy]))
{ /* free border field */
}
else if (IS_FREE(xx, yy) || CAN_GROW_INTO(Feld[xx][yy]))
{ /* free border field */
- if (n
achbarn
>= life_parameter[2] &&
- n
achbarn
<= life_parameter[3])
+ if (n
um_neighbours
>= life_parameter[2] &&
+ n
um_neighbours
<= life_parameter[3])
{
Feld[xx][yy] = element;
MovDelay[xx][yy] = (element == EL_GAME_OF_LIFE ? 0 : life_time-1);
{
Feld[xx][yy] = element;
MovDelay[xx][yy] = (element == EL_GAME_OF_LIFE ? 0 : life_time-1);