Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // lib.js
- function SceneController(colsCount, rowsCount, types) {
- var _self = this;
- _self.colsCount = colsCount;
- _self.rowsCount = rowsCount;
- _self.types = types;
- _self.getAllWithSameType = function(subjectColNumber, subjectRowNumber) {
- // TODO: do some magic and return list of nearest fields with same type
- };
- _self.disaperAndRefreshField = function(colNumber, rowNumber) {
- // TODO: do some magic and refresh field (write field updating provider)
- }
- (function() {
- // Scene initialization
- for (var x = 0; x < _self.colsCount-1; x++) {
- for (var y = 0; y < _self.rowsCount-1; y++) {
- // TODO: select random type and create field with this one
- }
- }
- })()
- }
- // app.js
- var scene = new SceneController(16, 16);
- ...
Add Comment
Please, Sign In to add comment