Javascript Code Golf Game

But after reading the golf source, that probably won't work :D

Haha, I did try something similar with the correct values in the array. It works but takes more than 200 characters to type out the whole array :p

What are you using as the exit clause for your main loop?
Do you really need that if you know exactly how many times to loop?
 
Haha, I did try something similar with the correct values in the array. It works but takes more than 200 characters to type out the whole array :p

What are you using as the exit clause for your main loop?
Do you really need that if you know exactly how many times to loop?

I just return when the original number is the same as a calculated sociable number, which makes it an amicable number. Also down to 119 109 107.
 
Last edited:
I just return when the original number is the same as a calculated sociable number, which makes it an amicable number. Also down to 119 109.

That's what I had first as well.

The way i'm doing it now, like i said before, is pretty much cheating.
I have worked out what gets passed to my function (1***6) and written code that works specifically with that value - i know exactly how many loops are needed, i know that my calculation of divisors isnt correct but it works, so i can get away with bad code because it happens to work for this specific scenario. Any other value passed to my function would crash it.
 
Last edited:
That's what I had first as well.

The way i'm doing it now, like i said before, is pretty much cheating.
I have worked out what gets passed to my function (1***6) and written code that works specifically with that value - i know exactly how many loops are needed, i know that my calculation of divisors isnt correct but it works, so i can get away with bad code because it happens to work for this specific scenario. Any other value passed to my function would crash it.

I originally tried returning a request from my server using node, since it evals the code :D. Turned out the request code was longer than my generator. When does this end?
 
I originally tried returning a request from my server using node, since it evals the code :D. Turned out the request code was longer than my generator. When does this end?

It never ends.
Touch id says thats almost cheating but your not winning anyway.
Few other ones I set up a while ago if you wanna play.
www.hazy.xyz:1122
www.hazy.xyz:1123
www.hazy.xyz:1124

List of changes to do to the game are to allow more "holes" in 1 game
Change the validation to check for multiple inputs vs multiple outputs at the moment as you have seen it just takes 1 input and checks against 1 output.
Change the way keys/tokens are used.
 
I originally tried returning a request from my server using node, since it evals the code :D. Turned out the request code was longer than my generator. When does this end?

Haha, i thought about hosting a javascript file on my own server with the calculation function in it and just trying to use the play() function to call that.
Also tried setting up a webservice but I dont know enough about javascript to do either of these :(
 
You might also want to change the default admin passwords, lol.
Was wondering how long it would be till someone found them :D. Im mid way through making my changes having few issues as never used node before and time constraints but nodetool for VS makes it very easy to work with node in VS.
 
Was wondering how long it would be till someone found them :D. Im mid way through making my changes having few issues as never used node before and time constraints but nodetool for VS makes it very easy to work with node in VS.

I've used Node quite a bit, if you need any help with it just hit me up. :)
 
Back
Top Bottom