Skip to content

Instantly share code, notes, and snippets.

View floralvikings's full-sized avatar

Caleb Brinkman floralvikings

View GitHub Profile
import java.util.Collection;
import java.util.LinkedList;
public class Main
{
public static void main(String[] args) {
Node carNode = new CarNode();
for (int i = 1; i <= 4; i++) {
carNode.getChildren().add(new TireNode(i));
@floralvikings
floralvikings / AutoCompleteTextBox.java
Last active December 30, 2023 04:41
Simple JavaFX TextBox with AutoComplete functionality based on a supplied set.
import javafx.beans.value.ChangeListener;
import javafx.beans.value.ObservableValue;
import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.geometry.Side;
import javafx.scene.control.ContextMenu;
import javafx.scene.control.CustomMenuItem;
import javafx.scene.control.Label;
import javafx.scene.control.TextField;
@floralvikings
floralvikings / robot.js
Created December 11, 2012 18:38
LooperBot 1.1
var forward = true;
var rotateClockwise = true;
var turnClockwise = true;
var correctCannonForTurning = true;
var attackClone = false;
var startedScanClockwise = true;
var spotted = false;
var moveSpeed = 3;
var rotateSpeed = 2;
var turnSpeed = 0;
@floralvikings
floralvikings / robot.js
Created December 6, 2012 16:09
LooperBot 1.0.1
var forward = true;
var rotateClockwise = true;
var turnClockwise = true;
// This corrects the cannon's rotation when turning. Slows the bot considerably when turning, consider carefully.
var correctCannonForTurning = true;
var attackClone = false;
var moveSpeed = 3;
var rotateSpeed = 2;
var turnSpeed = 0;
var scanning = true;