@@ -132,7 +132,7 @@ function render(gh)
132
132
ok = gh.isRunning();
133
133
134
134
if (!ok) { gh.sync.setStatus(false); }
135
- gh.mw. sleep();
135
+ sleep(30 );
136
136
gh.sync.nextID();
137
137
}
138
138
}
@@ -141,7 +141,7 @@ function render(gh)
141
141
function make_moves(gh)
142
142
{
143
143
var ok = true;
144
- var st = 0.5 ;
144
+ var st = 0.3 ;
145
145
var tini = microtime();
146
146
147
147
while (gh.sync.status()) {
@@ -163,7 +163,7 @@ function make_moves(gh)
163
163
164
164
tini = tfim;
165
165
}
166
- gh.mw. sleep();
166
+ sleep(15 );
167
167
gh.sync.nextID();
168
168
}
169
169
}
@@ -334,9 +334,11 @@ class Game {
334
334
function finish() {
335
335
this.mw.setColor(8);
336
336
this.mw.addStr(this.x0 - 3, 2, "GAME OVER!");
337
+ this.mw.refresh();
337
338
338
339
this.mw.setColor(2);
339
340
this.mw.addStr(this.n + this.x0 + 1, 2, "Press 'ctrl+C' to exit.");
341
+ this.mw.refresh();
340
342
341
343
wait(this.mw, 113);
342
344
}
@@ -346,9 +348,11 @@ class Game {
346
348
function title() {
347
349
this.mw.setColor(7);
348
350
this.mw.addStr(0, 0, "The Wild X");
351
+ this.mw.refresh();
349
352
350
353
this.mw.setColor(2);
351
354
this.mw.addStr(this.n + this.x0 + 1, 2, "Press 'ctrl+C' to quit.");
355
+ this.mw.refresh();
352
356
}
353
357
354
358
/****************************************************************************/
@@ -360,6 +364,7 @@ class Game {
360
364
361
365
this.mw.setColor(this.colors[c]);
362
366
this.mw.addChar(i + this.x0, j + this.y0, c);
367
+ this.mw.refresh();
363
368
}
364
369
}
365
370
}
@@ -389,6 +394,7 @@ class Game {
389
394
390
395
this.mw.setColor(this.colors['.']);
391
396
this.mw.addChar(px + this.x0, py + this.y0, '.');
397
+ this.mw.refresh();
392
398
393
399
this.mutex.lock();
394
400
var kk = this.last_key.getInt();
@@ -483,6 +489,7 @@ class Game {
483
489
this.mw.refresh();
484
490
485
491
print_info(this.mw, "Position player: ", "(" + py + ", " + px + ") ", this.n + this.x0 + 3, 2, 12, 10);
492
+ this.mw.refresh();
486
493
}
487
494
488
495
/****************************************************************************/
@@ -496,6 +503,7 @@ class Game {
496
503
print_score(this.mw, this.colorst, '$', this.player.score.nS, this.x0 - 2, 25, 12);
497
504
print_score(this.mw, this.colorst, '*', this.player.score.nP, this.x0 - 2, 35, 12);
498
505
print_score(this.mw, this.colorst, '@', this.player.score.nA, this.x0 - 2, 45, 12);
506
+ this.mw.refresh();
499
507
}
500
508
501
509
/****************************************************************************/
0 commit comments