not really known
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

38 lines
805 B

  1. module.exports=
  2. {
  3. /**
  4. * Returns a random word
  5. * @returns {string}
  6. */
  7. roomOpen : function(name, rooms)
  8. {
  9. rooms.foreach(function(r)
  10. {
  11. if(name === r.roomName)
  12. {
  13. return false;
  14. }
  15. });
  16. return true;
  17. },
  18. userAvailable : function(name, players)
  19. {
  20. // players.foreach(function(p)
  21. // {
  22. // if(name === p.roomName)
  23. // {
  24. // return false;
  25. // }
  26. // });
  27. if(players[name] != null)
  28. return false
  29. return true;
  30. },
  31. getOpenIndex : function(rooms)
  32. {
  33. }
  34. };