All Questions
20 questions
3
votes
1
answer
91
views
Merge discrete integer intervals
What it does
The code starts with a set of integer intervals, and can add new intervals (possibly by updating existing intervals). Essentially, it is a bit array whose index starts at ...
2
votes
2
answers
125
views
Complex Filter in one Opration
I am working on a Data-based application.
I wrote a code to filter the table.
The table has String and Numbers.
I some filter ...
3
votes
1
answer
733
views
Object-Oriented JavaScript Chess game
I am currently creating a chess game in JavaScript, some aspects are yet to be done such as the computer player and turns, but before I get into writing these features I would like to know how to ...
3
votes
2
answers
130
views
Listing the playlists on which each song appears
I created a way to export my Google Play playlists to a text file and also a way to export all of my songs in Google Play to a text file. Now I have both the song list (in an array format) and ...
8
votes
2
answers
519
views
Object-oriented fractal tree
I made an object oriented fractal tree in javascript using the p5 library, it consists of three files:
Fraternal Tree.js
branch.js
flower.js
Here is the github repo with the source code. All the main ...
2
votes
1
answer
150
views
Modelling an account manager in OOP
I have this task of modelling a system where given a group of users each can keep track of their expenses. The basic requirements are as followed:
To be able to give credit to an user.
Find all the ...
8
votes
1
answer
603
views
SVG mosaic creator
Although my code works as expected, there are a few gotchas.
A single row is not filled at once; instead, I can see partially filled rows during the rendering process(Fixed in the updated code below.)....
11
votes
2
answers
3k
views
Pokemon game in JavaScript
I'm practicing my JavaScript skills by trying to create a Pokemon game. So far, I've made the dataset and the functions required to work the game. Can someone help me optimize the code and tell me why ...
3
votes
1
answer
405
views
JavaScript calendar widget
I'd like to know how I can refactor my JS code for usability.
Currently my JavaScript uses some HTML to build out a simple calendar with the following functionality:
a. opens into the current month ...
1
vote
2
answers
166
views
From scratch pub sub definition and implementation
I am finished with my implementation of PUB/SUB or Observer pattern, however I just want to see any ways that I may be able to improve this pattern. I wanted to be able to use the typical ...
2
votes
1
answer
179
views
My AJAX LiveDate Object
The LiveDate object displays the live current date and has a sendAjaxRequest() function dependency to send the AJAX requests.
I'...
4
votes
0
answers
85
views
Comparison of sprite movement implementations
I've come up with two ways to do sprite movement with CreateJS, and I'm wondering if one is better than the other as far as performance and maintainability.
The player data is saved in a json file ...
4
votes
1
answer
5k
views
OOP Blackjack game
I made this Blackjack game to help me learn the syntax of JavaScript classes and objects.
As I was writing the game I felt like I was misusing the idea of OOP. By that I mean I felt like some of the ...
6
votes
2
answers
1k
views
My Google Maps Script
I've written a script with the Google Maps JavaScript API v3.
I've ran it through JSHint and everything seems to be valid.
I'm wondering if my script has room for improvement.
Any suggestions are ...
8
votes
3
answers
381
views
Better card validity check in JS card game
I am writing a card game in Javascript. The game is played with a 32 card deck.
When a card is selected to be played by a user, i do a validity check on the server to check whether it matches the ...