1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-11-26 18:25:13 +00:00

mine adjacency rule can be changed (in 2D for now)

This commit is contained in:
Zeno Rogue
2019-04-08 14:58:54 +02:00
parent 8a53258361
commit 9b7ad345a9
3 changed files with 46 additions and 10 deletions

View File

@@ -2741,8 +2741,8 @@ const char* minetexts[8] = {
int countMinesAround(cell *c) {
int mines = 0;
for(int i=0; i<c->type; i++)
if(c->move(i) && c->move(i)->wall == waMineMine)
for(cell *c2: adj_minefield_cells(c))
if(c2->wall == waMineMine)
mines++;
return mines;
}
@@ -6544,10 +6544,10 @@ void drawscreen() {
mines[p] = 0;
cell *c = playerpos(p);
if(!c) continue;
for(int i=0; i<c->type; i++) if(c->move(i)) {
if(c->move(i)->land == laMinefield)
for(cell *c2: adj_minefield_cells(c)) {
if(c2->land == laMinefield)
minefieldNearby = true;
if(c->move(i)->wall == waMineMine) {
if(c2->wall == waMineMine) {
bool ep = false;
if(!ep) mines[p]++, tmines++;
}