Copy two example bots from the examples folder and paste them into the bots folder. Rename the copies in bots to player1.js and player2.js. Edit them and have fun!
For more info on the available functions, you can checkout the fruitbot api at http://fruitbots.org/api/api
The fruitHelp API by Nik Steel makes a list of all available fruit and includes functions for working with those, such as calculating the distance between a player and a piece of fruit, choosing the fruit that has the minimum distance, and choosing a player action to move towards the targeted fruit with the minimum path.
A description of the available functions and their usage is in the fruitHelp_api.js file in this repo.