A Boiding workshop starter kit using node.
For feedback and improvements go to the repository
The package.json
describes a register
script that can be used to register
your team. It can be invoked via
npm run register -- <team-name>
The script needs an argument; the team name. If you are looking for inspiration, why not join your favorite color, your favorite city and your favorite animal with dashes. E.g. my team name would be yellow-nijmegen-ant.
When you want to unregister, for what every reason. Pass the --unregister
flag
to the above command.
npm run register -- --unregister <team-name>
To start the node brain server run the command
node server.js
Remember to restart your server everytime you made some changes.
In the server.js
file there is a function called behavior
. This function controls
the intent of a single boid. The function accepts the boid under consideration
and the entire flock.
From these inputs it is this functions task to determine the boid's intent. I.e. you need to return an object with an intented heading and intended speed.
{
"heading": 0.0,
"speed": 0.0
}