Code for the in game function


#1

Hi all,

Where can i find the code for the in game functions?
I was wondering how the getNearest() function is working and if i could see the implementation of the function.

Thanks in advance


#2

The code is all available on their GitHub: https://github.com/codecombat/codecombat


#3

Actually, most of the code for the game engine is inside the level editor itself: http://codecombat.com/editor/level/greed – click “Components”, then click on a component to see its code. getNearest is in alliance.Allied, strangely enough.

Archmage @Darredevil has built a Components documentation page that will soon be built into the level editor, and it will even have the Components’ code included as soon as we next deploy.


#4

Thanks for the info.