Skip to content

Commit b876a72

Browse files
committed
Assynchronous enemies added to WildX
1 parent 29d86bf commit b876a72

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

samples/wildX/engine/game.clv

+4-1
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ class Game {
254254
this.nAo = 0;
255255

256256
/* This game use NCurses as graphical engine*/
257-
this.mw = NCurses.new(true, 2);
257+
this.mw = NCurses.new(true, 30);
258258

259259
/* Enable key reading */
260260
this.mw.noEcho();
@@ -480,6 +480,7 @@ class Game {
480480

481481
this.mw.setColor(this.colors['x']);
482482
this.mw.addChar(px + this.x0, py + this.y0, 'x');
483+
this.mw.refresh();
483484

484485
print_info(this.mw, "Position player: ", "(" + py + ", " + px + ") ", this.n + this.x0 + 3, 2, 12, 10);
485486
}
@@ -583,9 +584,11 @@ class Game {
583584

584585
this.mw.setColor(this.colors['.']);
585586
this.mw.addChar(px + this.x0, py + this.y0, '.');
587+
this.mw.refresh();
586588

587589
this.mw.setColor(this.colors['+']);
588590
this.mw.addChar(r.x + this.x0, r.y + this.y0, '+');
591+
this.mw.refresh();
589592
}
590593

591594
px = r.x;

0 commit comments

Comments
 (0)