Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 260350 Details for
Bug 488906
Error running lint because the tern server is not started
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
debug output
junk.txt (text/plain), 19.27 KB, created by
Steve Northover
on 2016-03-16 11:20:42 EDT
(
hide
)
Description:
debug output
Filename:
MIME Type:
Creator:
Steve Northover
Created:
2016-03-16 11:20:42 EDT
Size:
19.27 KB
patch
obsolete
>postMessage (0) - MESSAGE QUEUED: {"request":"lint","args":{"meta":{"location":"/file/snorthov-OrionContent/minesweeper-objects/public/js/main.js"},"files":[{"type":"full","name":"/file/snorthov-OrionContent/minesweeper-objects/public/js/main.js","text":"/*eslint-env browser */\n\nvar SAD = \"data/sad.gif\";\nvar HAPPY = \"data/happy.gif\";\nvar SMILE = \"data/smile.gif\";\n//var SURPRISE = \"data/surprise.gif\";\n\nvar board, counter1, counter2, button, timerId;\n\nfunction mouseUp () {\n\tif (board.isSwept () || board.isExploded ()) {\n\t\twindow.clearInterval (timerId);\n\t\tbutton.src = board.isExploded () ? SAD : HAPPY;\n\t} else {\n\t\tcounter1.setValue(board.getMineCount() - board.getGuessCount());\n\t}\n}\n\n//TODO - Rename main() to main2() using 'References' menu\nfunction main() {\n\tcounter1 = new Counter (\"counter1\");\n\tcounter2 = new Counter (\"counter2\");\n\n\tboard = new Board (\"board\");\n\tboard.reset (8, 8, 8);\n\tcounter1.setValue (board.getMineCount());\n\tcounter2.setValue (0);\n\tbutton = document.getElementById(\"button\");\n\tbutton.src = SMILE;\n\t\n\t//TODO - get rid of local variable count, use getValue()+1 instead\n\t//TODO - add .tern-project file to enable cross file navigation\n\t//TODO - use Navigation and CodeAssist on counter2\n\tvar count = 0;\n\tif (timerId) window.clearInterval (timerId);\n\ttimerId = window.setInterval(function () {\n\t\tcounter2.setValue (count++);\n\t}, 1000);\n}"}],"rules":{"accessor-pairs":1,"check-tern-project":0,"curly":0,"eqeqeq":1,"missing-doc":0,"missing-nls":0,"new-parens":1,"no-caller":1,"no-comma-dangle":0,"no-cond-assign":2,"no-console":0,"no-constant-condition":2,"no-control-regex":2,"no-debugger":1,"no-dupe-keys":2,"no-duplicate-case":2,"no-else-return":1,"no-empty-block":0,"no-empty-character-class":2,"no-empty-label":2,"no-eq-null":1,"no-eval":0,"no-extra-boolean-cast":2,"no-extra-parens":1,"no-extra-semi":1,"no-fallthrough":2,"no-implied-eval":0,"no-invalid-regexp":2,"no-irregular-whitespace":0,"no-iterator":2,"no-jslint":1,"no-mixed-spaces-and-tabs":0,"no-negated-in-lhs":2,"no-new-array":1,"no-new-func":1,"no-new-object":1,"no-new-wrappers":1,"no-obj-calls":2,"no-proto":2,"no-redeclare":1,"no-regex-spaces":2,"no-reserved-keys":2,"no-self-compare":2,"no-self-assign":2,"no-shadow":1,"no-shadow-global":1,"no-sparse-arrays":1,"no-throw-literal":1,"no-undef":2,"no-undef-expression":2,"no-undef-init":1,"no-unreachable":1,"no-unused-params":1,"no-unused-vars":1,"no-use-before-define":1,"no-with":1,"radix":1,"semi":1,"type-checked-consistent-return":2,"unnecessary-nls":0,"use-isnan":2,"valid-typeof":2}}} >javascriptPlugin.js [sm]:187worker_ready (0): {"request":"worker_ready"} >javascriptPlugin.js [sm]:155postMessage (1) - SENT {"request":"start_server","args":{"initial":true},"messageID":0} >javascriptPlugin.js [sm]:200server_ready (1): {"request":"start_server","state":"server_ready","messageID":0} >javascriptPlugin.js [sm]:311clearing MESSAGE queue: {"request":"lint","args":{"meta":{"location":"/file/snorthov-OrionContent/minesweeper-objects/public/js/main.js"},"files":[{"type":"full","name":"/file/snorthov-OrionContent/minesweeper-objects/public/js/main.js","text":"/*eslint-env browser */\n\nvar SAD = \"data/sad.gif\";\nvar HAPPY = \"data/happy.gif\";\nvar SMILE = \"data/smile.gif\";\n//var SURPRISE = \"data/surprise.gif\";\n\nvar board, counter1, counter2, button, timerId;\n\nfunction mouseUp () {\n\tif (board.isSwept () || board.isExploded ()) {\n\t\twindow.clearInterval (timerId);\n\t\tbutton.src = board.isExploded () ? SAD : HAPPY;\n\t} else {\n\t\tcounter1.setValue(board.getMineCount() - board.getGuessCount());\n\t}\n}\n\n//TODO - Rename main() to main2() using 'References' menu\nfunction main() {\n\tcounter1 = new Counter (\"counter1\");\n\tcounter2 = new Counter (\"counter2\");\n\n\tboard = new Board (\"board\");\n\tboard.reset (8, 8, 8);\n\tcounter1.setValue (board.getMineCount());\n\tcounter2.setValue (0);\n\tbutton = document.getElementById(\"button\");\n\tbutton.src = SMILE;\n\t\n\t//TODO - get rid of local variable count, use getValue()+1 instead\n\t//TODO - add .tern-project file to enable cross file navigation\n\t//TODO - use Navigation and CodeAssist on counter2\n\tvar count = 0;\n\tif (timerId) window.clearInterval (timerId);\n\ttimerId = window.setInterval(function () {\n\t\tcounter2.setValue (count++);\n\t}, 1000);\n}"}],"rules":{"accessor-pairs":1,"check-tern-project":0,"curly":0,"eqeqeq":1,"missing-doc":0,"missing-nls":0,"new-parens":1,"no-caller":1,"no-comma-dangle":0,"no-cond-assign":2,"no-console":0,"no-constant-condition":2,"no-control-regex":2,"no-debugger":1,"no-dupe-keys":2,"no-duplicate-case":2,"no-else-return":1,"no-empty-block":0,"no-empty-character-class":2,"no-empty-label":2,"no-eq-null":1,"no-eval":0,"no-extra-boolean-cast":2,"no-extra-parens":1,"no-extra-semi":1,"no-fallthrough":2,"no-implied-eval":0,"no-invalid-regexp":2,"no-irregular-whitespace":0,"no-iterator":2,"no-jslint":1,"no-mixed-spaces-and-tabs":0,"no-negated-in-lhs":2,"no-new-array":1,"no-new-func":1,"no-new-object":1,"no-new-wrappers":1,"no-obj-calls":2,"no-proto":2,"no-redeclare":1,"no-regex-spaces":2,"no-reserved-keys":2,"no-self-compare":2,"no-self-assign":2,"no-shadow":1,"no-shadow-global":1,"no-sparse-arrays":1,"no-throw-literal":1,"no-undef":2,"no-undef-expression":2,"no-undef-init":1,"no-unreachable":1,"no-unused-params":1,"no-unused-vars":1,"no-use-before-define":1,"no-with":1,"radix":1,"semi":1,"type-checked-consistent-return":2,"unnecessary-nls":0,"use-isnan":2,"valid-typeof":2}}} >/javascript/plugins/javascriptPlugin.js:9 postMessage (2) - SENT {"request":"lint","args":{"meta":{"location":"/file/snorthov-OrionContent/minesweeper-objects/public/js/main.js"},"files":[{"type":"full","name":"/file/snorthov-OrionContent/minesweeper-objects/public/js/main.js","text":"/*eslint-env browser */\n\nvar SAD = \"data/sad.gif\";\nvar HAPPY = \"data/happy.gif\";\nvar SMILE = \"data/smile.gif\";\n//var SURPRISE = \"data/surprise.gif\";\n\nvar board, counter1, counter2, button, timerId;\n\nfunction mouseUp () {\n\tif (board.isSwept () || board.isExploded ()) {\n\t\twindow.clearInterval (timerId);\n\t\tbutton.src = board.isExploded () ? SAD : HAPPY;\n\t} else {\n\t\tcounter1.setValue(board.getMineCount() - board.getGuessCount());\n\t}\n}\n\n//TODO - Rename main() to main2() using 'References' menu\nfunction main() {\n\tcounter1 = new Counter (\"counter1\");\n\tcounter2 = new Counter (\"counter2\");\n\n\tboard = new Board (\"board\");\n\tboard.reset (8, 8, 8);\n\tcounter1.setValue (board.getMineCount());\n\tcounter2.setValue (0);\n\tbutton = document.getElementById(\"button\");\n\tbutton.src = SMILE;\n\t\n\t//TODO - get rid of local variable count, use getValue()+1 instead\n\t//TODO - add .tern-project file to enable cross file navigation\n\t//TODO - use Navigation and CodeAssist on counter2\n\tvar count = 0;\n\tif (timerId) window.clearInterval (timerId);\n\ttimerId = window.setInterval(function () {\n\t\tcounter2.setValue (count++);\n\t}, 1000);\n}"}],"rules":{"accessor-pairs":1,"check-tern-project":0,"curly":0,"eqeqeq":1,"missing-doc":0,"missing-nls":0,"new-parens":1,"no-caller":1,"no-comma-dangle":0,"no-cond-assign":2,"no-console":0,"no-constant-condition":2,"no-control-regex":2,"no-debugger":1,"no-dupe-keys":2,"no-duplicate-case":2,"no-else-return":1,"no-empty-block":0,"no-empty-character-class":2,"no-empty-label":2,"no-eq-null":1,"no-eval":0,"no-extra-boolean-cast":2,"no-extra-parens":1,"no-extra-semi":1,"no-fallthrough":2,"no-implied-eval":0,"no-invalid-regexp":2,"no-irregular-whitespace":0,"no-iterator":2,"no-jslint":1,"no-mixed-spaces-and-tabs":0,"no-negated-in-lhs":2,"no-new-array":1,"no-new-func":1,"no-new-object":1,"no-new-wrappers":1,"no-obj-calls":2,"no-proto":2,"no-redeclare":1,"no-regex-spaces":2,"no-reserved-keys":2,"no-self-compare":2,"no-self-assign":2,"no-shadow":1,"no-shadow-global":1,"no-sparse-arrays":1,"no-throw-literal":1,"no-undef":2,"no-undef-expression":2,"no-undef-init":1,"no-unreachable":1,"no-unused-params":1,"no-unused-vars":1,"no-use-before-define":1,"no-with":1,"radix":1,"semi":1,"type-checked-consistent-return":2,"unnecessary-nls":0,"use-isnan":2,"valid-typeof":2}},"messageID":1} >/javascript/plugins/javascriptPlugin.js:9 postMessage (3) - SENT {"request":"start_server","args":{"options":{"libs":["ecma5"],"ecmaVersion":5,"loadEagerly":["/file/snorthov-OrionContent/minesweeper-objects/public/index.html"]}},"messageID":2} >/javascript/plugins/javascriptPlugin.js:9 server_ready (3): {"request":"start_server","state":"server_ready","messageID":2} >/javascript/plugins/javascriptPlugin.js:9 postMessage (3) - SENT {"request":"read","ternID":0,"args":{"file":"/file/snorthov-OrionContent/minesweeper-objects/public/index.html","contents":"<html>\n<head>\n\t<link rel=\"stylesheet\" type=\"text/css\" href=\"css/board.css\" />\n\t<script src=\"js/counter.js\"></script>\n\t<script src=\"js/board.js\"></script>\n\t<script src=\"js/main.js\"></script>\n</head>\n\n<body onload=\"main()\">\n<table onmouseup=\"mouseUp()\">\n\t<tr align=\"center\">\n\t\t<td><div id=\"counter1\"></div></td>\n\t\t<td><button onClick=\"main()\"><img id=\"button\" src=\"data/smile.gif\"></button></td>\n\t\t<td><div id=\"counter2\"></div></td>\n\t</tr>\n\t<tr>\n\t\t<td colspan=\"3\"><div id=\"board\"</div></td>\n\t</tr>\n</table>\n</body>\n</html>"}} >/javascript/plugins/javascriptPlugin.js:9 postMessage (3) - SENT {"request":"read","ternID":1,"args":{"logical":"js/counter.js","contents":"/*eslint-env browser */\n\nfunction Counter (tag) {\n\tvar value = 0;\n\tvar digits = new Array (3);\n\tinitCounter();\n\t\n\t//TODO - rename setValue() to setValue2() using references\n\tthis.setValue = function setValue (newValue) {\n\t\tvalue = Math.max (0, Math.min (999, newValue));\n\t\tdigits[0].src = \"data/\" + Math.floor(value / 100 % 10) + \".gif\";\n\t\tdigits[1].src = \"data/\" + Math.floor(value / 10 % 10) + \".gif\";\n\t\tdigits[2].src = \"data/\"+ Math.floor(value % 100 % 10) + \".gif\";\n\t};\n\t\n\tthis.getValue = function getValue () {\n\t\treturn value;\n\t};\n\t\n\tfunction createDigit () {\n\t\tvar digit = document.createElement(\"img\");\n\t\tdigit.src = \"0.gif\";\n\t\treturn digit;\n\t}\n\t\n\tfunction initCounter () {\n\t\tvar parentElement;\n\t\tif (tag) {\n\t\t\tparentElement = document.getElementById (tag);\n\t\t} else {\n\t\t\tparentElement = document.getElementsByTagName(\"body\")[0];\n\t\t}\n\t\twhile(parentElement.firstChild) {\n\t\t\tparentElement.removeChild(parentElement.firstChild);\n\t\t}\n\t\tfor (var i=0; i<digits.length; i++) {\n\t\t\tparentElement.appendChild(digits [i] = createDigit());\n\t\t}\n\t}\n}\n","file":"/file/snorthov-OrionContent/minesweeper-objects/public/js/counter.js","path":"minesweeper-objects/public/js/counter.js"}} >/javascript/plugins/javascriptPlugin.js:9 postMessage (3) - SENT {"request":"read","ternID":2,"args":{"logical":"js/board.js","contents":"/*eslint-env browser */\n\r\n/* Square States */\r\nvar SQUARE = \"square\";\r\nvar MINE = \"square mine\";\r\nvar EXPLOSION = \"square explosion\";\r\nvar FLAG = \"square flag\";\r\nvar QUESTION = \"square question\";\r\nvar WRONG = \"square wrong\";\r\nvar EMPTY = \"square empty\";\r\nfunction EMPTY_N(i) {\r\n\treturn i === 0 ? EMPTY : SQUARE + \" mines\" + i;\r\n}\r\n\r\nfunction Board (tag) {\r\n\tvar board = this;\r\n\tvar table, rows = 8, columns = 8;\r\n\tvar mineCount = rows + columns;\r\n\t\r\n\tfunction squareAt (i, j) {\r\n\t\treturn table.childNodes[0].childNodes[i].childNodes[j].childNodes[0];\r\n\t}\r\n\t\r\n\tthis.isExploded = function isExploded () {\r\n\t\tfor (var i=0; i<rows; i++) {\r\n\t\t\tfor (var j=0; j<columns; j++) {\r\n\t\t\t\tif (squareAt(i, j).image === EXPLOSION) return true;\r\n\t\t\t\tif (squareAt(i, j).image === WRONG) return true;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t};\r\n\t\r\n\tthis.isSwept = function isSwept () {\r\n\t\tvar mineCount = 0, selectedCount = 0;\r\n\t\tfor (var i=0; i<rows; i++) {\r\n\t\t\tfor (var j=0; j<columns; j++) {\r\n\t\t\t\tif (squareAt(i, j).selected) selectedCount++;\r\n\t\t\t\tif (squareAt(i, j).image === MINE) mineCount++;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn rows * columns === selectedCount + mineCount;\r\n\t};\r\n\t\r\n\tfunction mouseDown(e, i, j) {\r\n\t\tif (board.isSwept () || board.isExploded ()) return;\r\n\t\tif (squareAt(i, j).selected) return;\r\n\t\tif (!e) e = window.event;\r\n\t\tif (e.button === 0 || e.button === 1) {\r\n\t\t\tif (squareAt(i, j).guesses === FLAG) return;\r\n\t\t\tsquareAt(i, j).className = EMPTY;\r\n\t\t} else {\r\n\t\t\tif (squareAt(i, j).guesses === FLAG) {\r\n\t\t\t\tsquareAt(i, j).guesses = QUESTION;\r\n\t\t\t\tsquareAt(i, j).className = QUESTION;\r\n\t\t\t} else {\r\n\t\t\t\tif (squareAt(i, j).guesses === QUESTION) {\r\n\t\t\t\t\tsquareAt(i, j).guesses = undefined;\r\n\t\t\t\t\tsquareAt(i, j).className = SQUARE;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tsquareAt(i, j).guesses = FLAG;\r\n\t\t\t\t\tsquareAt(i, j).className = FLAG;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\tfunction select (i, j) {\r\n\t\tif (0 <= i && i < rows) {\r\n\t\t\tif (0 <= j && j < columns) {\r\n\t\t\t\tif (squareAt(i, j).selected) return;\r\n\t\t\t\tif (squareAt(i, j).image === MINE) return;\r\n\t\t\t\tif (squareAt(i, j).guesses === FLAG) return;\r\n\t\t\t\tsquareAt(i, j).selected = true;\r\n\t\t\t\tif (squareAt(i, j).image) {\r\n\t\t\t\t\tsquareAt(i, j).className = squareAt(i, j).image;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tsquareAt(i, j).className = EMPTY;\r\n\t\t\t\t\tselect (i, j - 1);\r\n\t\t\t\t\tselect (i - 1, j);\r\n\t\t\t\t\tselect (i + 1, j);\r\n\t\t\t\t\tselect (i, j + 1);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t//BUG mouse up left button doesn't come when dragged\r\n\t//BUG mouse up right button doesn't come at all on Safari\r\n\tfunction mouseUp(e, i, j) {\r\n\t\tif (board.isSwept () || board.isExploded ()) return;\r\n\t\tif (squareAt(i, j).selected) return;\r\n\t\tif (!e) e = window.event;\r\n\t\tif (e.button === 0 || e.button === 1) {\r\n\t\t\tif (squareAt(i, j).image) {\r\n\t\t\t\tif (squareAt(i, j).guesses === FLAG) return;\r\n\t\t\t\tsquareAt(i, j).selected = true;\r\n\t\t\t\tsquareAt(i, j).className = squareAt(i, j).image;\r\n\t\t\t\tif (squareAt(i, j).image === MINE) {\r\n\t\t\t\t\tsquareAt(i, j).image = EXPLOSION;\r\n\t\t\t\t\tboard.reveal ();\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tselect (i, j);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\tfunction mouseDownFunction (i, j) {\r\n\t\treturn function (e) {mouseDown(e, i, j);};\r\n\t}\r\n\t\r\n\tfunction mouseUpFunction (i, j) {\r\n\t\treturn function (e) {mouseUp(e, i, j);};\r\n\t}\r\n\t\r\n\tfunction initTable () {\r\n\t\tvar parentElement;\r\n\t\tif (tag) {\r\n\t\t\tparentElement = document.getElementById(tag);\r\n\t\t} else {\r\n\t\t\tparentElement = document.getElementsByTagName(\"body\")[0];\r\n\t\t}\r\n\t\twhile (parentElement.firstChild) {\r\n\t\t\tparentElement.removeChild (parentElement.firstChild);\r\n\t\t}\r\n\t\t/*var*/ table = document.createElement(\"table\");\r\n\t\tvar tableBody = document.createElement(\"tbody\");\r\n\t\tfor (var i=0; i<rows; i++) {\r\n\t\t\tvar row = document.createElement(\"tr\");\r\n\t\t\tfor (var j=0; j<columns; j++) {\r\n\t\t\t\tvar cell = document.createElement(\"td\");\r\n\t\t\t\tvar image = document.createElement(\"img\");\r\n\t\t\t\timage.className = SQUARE;\r\n\t\t\t\t//TODO - get rid of magic number, make shadow.jpg the right size\r\n\t\t\t\timage.width = image.height = 18;\r\n\t\t\t\timage.onmousedown = mouseDownFunction (i, j);\r\n\t\t\t\timage.onmouseup = mouseUpFunction (i, j);\r\n\t\t\t\timage.oncontextmenu = function () {return false;};\r\n\t\t\t\tcell.appendChild(image);\r\n\t\t\t\trow.appendChild(cell);\r\n\t\t\t}\r\n\t\t\ttableBody.appendChild(row);\r\n\t\t}\r\n\t\ttable.appendChild(tableBody);\r\n\t\tparentElement.appendChild(table);\r\n\t}\r\n\t \r\n\tfunction initBoard () {\r\n\t\tvar count = 0;\r\n\t\twhile (count < mineCount) {\r\n\t\t\tvar r = Math.floor(Math.random() * rows);\r\n\t\t\tvar c = Math.floor(Math.random() * columns);\r\n\t\t\tif (!squareAt (r, c).image) {\r\n\t\t\t\tsquareAt (r, c).image = MINE;\r\n\t\t\t\tcount++;\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor (var i=0; i<rows; i++) {\r\n\t\t\tfor (var j=0; j<columns; j++) {\r\n\t\t\t\tif (!squareAt(i, j).image) {\r\n\t\t\t\t\tvar awayCount = 0;\r\n\t\t\t\t\tfor (var k=i-1; k<i+2; k++) {\r\n\t\t\t\t\t\tfor (var l=j-1; l<j+2; l++) {\r\n\t\t\t\t\t\t\tif (0 <= k && k < rows) {\r\n\t\t\t\t\t\t\t\tif (0 <= l && l < columns) {\r\n\t\t\t\t\t\t\t\t\tif (squareAt(k, l).image === MINE) awayCount++;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (awayCount !== 0) squareAt(i, j).image = EMPTY_N(awayCount);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\tthis.reset = function reset (newRows, newColumns, newMineCount) {\r\n\t\trows = newRows;\r\n\t\tcolumns = newColumns;\r\n\t\tmineCount = newMineCount;\r\n\t\tinitTable ();\r\n\t\tinitBoard ();\r\n\t};\r\n\t\r\n\t//BUG Safari does not redraw the images every time (clicking anywhere repaints)\r\n\tthis.reveal = function reveal () {\r\n\t\tfor (var i=0; i<rows; i++) {\r\n\t\t\tfor (var j=0; j<columns; j++) {\r\n\t\t\t\tsquareAt(i, j).selected = true;\r\n\t\t\t\tif (squareAt(i, j).guesses === FLAG) {\r\n\t\t\t\t\tif (squareAt(i, j).image !== MINE) {\r\n\t\t\t\t\t\tsquareAt(i, j).className = WRONG;\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tsquareAt(i, j).className = squareAt(i, j).image ? squareAt(i, j).image : EMPTY;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\t\r\n\tthis.getGuessCount = function getGuessCount () {\r\n\t\tvar count = 0;\r\n\t\tfor (var i=0; i<rows; i++) {\r\n\t\t\tfor (var j=0; j<columns; j++) {\r\n\t\t\t\tif (squareAt(i, j).guesses === FLAG) count++;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn count;\r\n\t};\r\n\t\r\n\tthis.getMineCount = function getMineCount () {\r\n\t\tvar count = 0;\r\n\t\tfor (var i=0; i<rows; i++) {\r\n\t\t\tfor (var j=0; j<columns; j++) {\r\n\t\t\t\tif (squareAt(i, j).image === MINE) count++;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn count;\r\n\t};\r\n\r\n\tthis.reset (rows, columns, mineCount);\r\n}","file":"/file/snorthov-OrionContent/minesweeper-objects/public/js/board.js","path":"minesweeper-objects/public/js/board.js"}} >/javascript/plugins/javascriptPlugin.js:9 postMessage (3) - SENT {"request":"read","ternID":3,"args":{"logical":"js/main.js","contents":"/*eslint-env browser */\n\nvar SAD = \"data/sad.gif\";\nvar HAPPY = \"data/happy.gif\";\nvar SMILE = \"data/smile.gif\";\n//var SURPRISE = \"data/surprise.gif\";\n\nvar board, counter1, counter2, button, timerId;\n\nfunction mouseUp () {\n\tif (board.isSwept () || board.isExploded ()) {\n\t\twindow.clearInterval (timerId);\n\t\tbutton.src = board.isExploded () ? SAD : HAPPY;\n\t} else {\n\t\tcounter1.setValue(board.getMineCount() - board.getGuessCount());\n\t}\n}\n\n//TODO - Rename main() to main2() using 'References' menu\nfunction main() {\n\tcounter1 = new Counter (\"counter1\");\n\tcounter2 = new Counter (\"counter2\");\n\n\tboard = new Board (\"board\");\n\tboard.reset (8, 8, 8);\n\tcounter1.setValue (board.getMineCount());\n\tcounter2.setValue (0);\n\tbutton = document.getElementById(\"button\");\n\tbutton.src = SMILE;\n\t\n\t//TODO - get rid of local variable count, use getValue()+1 instead\n\t//TODO - add .tern-project file to enable cross file navigation\n\t//TODO - use Navigation and CodeAssist on counter2\n\tvar count = 0;\n\tif (timerId) window.clearInterval (timerId);\n\ttimerId = window.setInterval(function () {\n\t\tcounter2.setValue (count++);\n\t}, 1000);\n}","file":"/file/snorthov-OrionContent/minesweeper-objects/public/js/main.js","path":"minesweeper-objects/public/js/main.js"}}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 488906
:
260069
| 260350 |
260363
|
260364