Differences From Artifact [700e6bf10300d920]:
- File
game.d
- 2012-07-14 07:47:55 - part of checkin [b6daa1efa1] on branch trunk - Modularized version. (user: kinaba) [annotate]
To Artifact [e8c7d41c69c50305]:
- File
game.d
- 2012-07-14 07:58:45 - part of checkin [3e342af26c] on branch trunk - long score. (user: kinaba) [annotate]
327 327
328 int turn = 0; 328 int turn = 0;
329 bool dead = false; 329 bool dead = false;
330 int lambda = 0; 330 int lambda = 0;
331 int exit_bonus = 0; 331 int exit_bonus = 0;
332 int under_warter = 0; 332 int under_warter = 0;
333 @property { 333 @property {
334 int score() { return lambda*25*(1+exit_bonus) - turn; } | 334 long score() { return lambda*25L*(1+exit_bonus) - turn; }
335 int water_level() { return water.level(turn); } 335 int water_level() { return water.level(turn); }
336 int water_until_rise() { return water.until_rise(turn); } 336 int water_until_rise() { return water.until_rise(turn); }
337 bool cleared() { return exit_bonus>0; } 337 bool cleared() { return exit_bonus>0; }
338 int hp() { return map.waterproof - under_warter; } 338 int hp() { return map.waterproof - under_warter; }
> 339 long score_if_abort_now() { return lambda*25*(1+max(1,exit_bonus
339 } 340 }
340 } 341 }
341 342
342 unittest 343 unittest
343 { 344 {
344 Game.load(["###","...","#RL"], ["xxx":"yyy"]); 345 Game.load(["###","...","#RL"], ["xxx":"yyy"]);
345 } 346 }