Skip to content

Instantly share code, notes, and snippets.

@zeroeth
Created October 9, 2013 18:50
Show Gist options
  • Select an option

  • Save zeroeth/6906159 to your computer and use it in GitHub Desktop.

Select an option

Save zeroeth/6906159 to your computer and use it in GitHub Desktop.
yep
import org.nlogo.api.*;
public class CropCalculatorList extends DefaultReporter {
public Syntax getSyntax ()
{
int[] arguments = new int[] {Syntax.NumberType ()};
int return_value = Syntax.ListType ();
return Syntax.reporterSyntax(arguments, return_value);
}
public Object report(Argument args[], Context context)
{
LogoListBuilder list = new LogoListBuilder ();
int farmer_rage = args[0].getIntValue ();
int crop_mutation = args[1].getIntValue ();
int[] gammygam = gams.do_stuff (farmer_rage, crop_mutation);
for( int i = 0; i < gammygam.length; i++)
{
list.add(Double.valueOf (gammygam[i]);
}
return list.toLogoList ();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment