Guest User

Untitled

a guest
Jun 20th, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. // lib.js
  2.  
  3. function SceneController(colsCount, rowsCount, types) {
  4. var _self = this;
  5.  
  6. _self.colsCount = colsCount;
  7. _self.rowsCount = rowsCount;
  8. _self.types = types;
  9.  
  10. _self.getAllWithSameType = function(subjectColNumber, subjectRowNumber) {
  11. // TODO: do some magic and return list of nearest fields with same type
  12. };
  13.  
  14. _self.disaperAndRefreshField = function(colNumber, rowNumber) {
  15. // TODO: do some magic and refresh field (write field updating provider)
  16. }
  17.  
  18. (function() {
  19. // Scene initialization
  20.  
  21. for (var x = 0; x < _self.colsCount-1; x++) {
  22. for (var y = 0; y < _self.rowsCount-1; y++) {
  23. // TODO: select random type and create field with this one
  24. }
  25. }
  26. })()
  27. }
  28.  
  29.  
  30.  
  31. // app.js
  32.  
  33. var scene = new SceneController(16, 16);
  34. ...
Add Comment
Please, Sign In to add comment