Javascript Code Golf Game

Associate
Joined
16 Apr 2007
Posts
2,208
Hi Guys.
Ive been playing around with something I found from MancJS' github.
Basically its code golf e.g lowest number of chars wins.
http://www.hazy.xyz:1127 is the url for one Im currently hosting.
You play by uploading a file (enter as many times as you want it will just update your total.) with a function named play and return what its expecting.

e.g if the challenge was add world onto the input argument then all the file would need to contain is
function play(s){return s+'world'}

Anyone interested in playing?
 
Associate
OP
Joined
16 Apr 2007
Posts
2,208
Same.

I did a little test and now i cant figure out how to try again?
Tells me i need to enter an email address but says it's already taken if i use the same one again?

Your key is m0zv1zx stops other people using your email address but it doesnt store it in cookies or anything just url so without publicly posting your email use
Code:
http://www.hazy.xyz:1127/?email=emailehere&team=ocuk-touch&key=m0zv1zx

Pretty good with JavaScript, not so good with math. Never even heard of a sociable number :) Can't get my head around the algo.

I didnt either just googled it till I found some examples to test my algorithm with I use this to check my outputs vs what I think it should output
http://jsfiddle.net/kr9n4gj5/
 
Last edited:
Associate
OP
Joined
16 Apr 2007
Posts
2,208
Got it. :) Going to try golf it some more.
Gratz its amazing how much you can remove.

How do you get the key?

I'm getting the same 'email already taken' error now.
I get it from admin area
3m51345 is dr test and
tybfpax is gravy monster since you need email anyway I guess can be public :D. I didnt make the game "engine" but I might tweak it abit to stop this happening.
 
Associate
OP
Joined
16 Apr 2007
Posts
2,208
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.
 
Associate
OP
Joined
16 Apr 2007
Posts
2,208
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.
 
Back
Top Bottom