Tagged Questions
1
vote
0answers
28 views
Is this code for getting the dependency tree of a file correct?
function dep_tree(graph,node,prev_deps){
return uniq(flatten(graph[node].map(function(child_node){
if (contains(prev_deps,child_node))
throw "Circular reference between ...
2
votes
0answers
70 views
JavaScript basic game code structure tips
I'm learning JavaScript and came up with this basic game code structure (using the CreateJS framework):
var stage;
var totalLoaded = 0;
var manifest;
var game = game || {};
game.init = {
...
3
votes
1answer
201 views
Javascript PriorityQueue based on object property
I am pretty new to javascript development and its temperaments. I wrote this class which is a priority queue based on a numeric property of any object. As far as I can tell, the following code is ...
2
votes
3answers
133 views
Can someone have a look to my Chess Project?
I am currently working on an unfinished project about Chess, it will (at some point) be able to help me to make some chess variations just by pasting the FEN position while I play online.
But before ...
4
votes
2answers
198 views
How can I improve this JavaScript DOM-manipulation data-structure/algorithm?
(this is a crosspost from StackOverflow, it was suggested I asked here)
Goal
I've got a DOM with about 70 elements on it (divs with some content) . I need to move and toggle the display of those ...