All Downloads are FREE. Search and download functionalities are using the official Maven repository.
Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
com.barrybecker4.simulation.snake.data.LongSnakeData Maven / Gradle / Ivy
/** Copyright by Barry G. Becker, 2000-2011. Licensed under MIT License: http://www.opensource.org/licenses/MIT */
package com.barrybecker4.simulation.snake.data;
/**
* Long thin snake geometry data
*
* @author Barry Becker
*/
public final class LongSnakeData implements ISnakeData {
private static final int NUM_SEGMENTS = 50;
private static final double SEGMENT_LENGTH = 20;
/** The widths starting at the nose and edging at the tip of the tail */
private static final double[] WIDTHS = {
9.0, 18.0, 12.0, 13.0, 15.0, 17.0, 18.0, 19.0,
20.0, 20.5, 21.0, 21.0, 21.0, 21.0, 21.0, 21.0,
21.0, 21.0, 21.0, 21.0, 21.0, 21.0, 21.0, 21.0,
21.0, 21.0, 21.0, 21.0, 21.0, 21.0, 21.0, 21.0,
21.0, 21.0, 21.0, 21.0, 21.0, 20.0, 19.5, 19.0,
18.0, 17.0, 16.0, 15.0, 14.0, 13.0, 12.0, 10.0,
8.0, 6.0, 4.0
};
public int getNumSegments() {
return NUM_SEGMENTS;
}
public double getSegmentLength() {
return SEGMENT_LENGTH;
}
public double[] getWidths() {
return WIDTHS;
}
}