utils.js 482 B

123456789101112131415161718192021222324
  1. /* aPerdu : retourne vrai si le joueur a perdu
  2. * c'est à dire si un des indicateurs n'ets plus compris entre 0 et 100
  3. */
  4. function aPerdu() {
  5. for( i in indics) {
  6. if (i <=0 || i >=100) {
  7. return true;
  8. }
  9. }
  10. return false;
  11. }
  12. /*
  13. * getRndInteger : obtient un entier aleatoire entre min et max
  14. */
  15. function getRndInteger(min, max) {
  16. return Math.floor(Math.random() * (max - min) ) + min;
  17. }
  18. /* getEvent :
  19. */
  20. function getEvent() {
  21. }