Skip to content

Instantly share code, notes, and snippets.

View cangevine's full-sized avatar

Colin Angevine cangevine

View GitHub Profile
@cangevine
cangevine / gist:9106964
Last active August 29, 2015 13:56
Race
public class Race {
public static void main(String[] args) {
Race r = new Race();
try {
r.beginRace();
} catch (InterruptedException e) {
System.out.println("Unable to execute race...");
}
System.out.println(rt.getWinnersList());
Train t;
void setup() {
t = new Train();
size(500, 500);
}
void draw() {
background(255);
t.update();
void setup() {
size(500, 500);
}
void draw() {
background(255);
float period = 50;
float amplitude = 200;
float startAngle;
float angleVel;
float amp;
void setup() {
startAngle = 0;
angleVel = 0.4;
amp = 100;
size(500, 500);
}
String alphabet = "abcdefghijklmnopqrstuvwxyz";
void setup() {
String plaintext = "happy monday, everyone!";
String ciphertext = encrypt(plaintext, 1);
println(ciphertext);
}
void draw() {
}
@cangevine
cangevine / gist:b007a42d3255c31d69a1
Created October 2, 2014 02:40
Test your Stack implementation
// Notice: the Node should have a toString() method
// which returns the <content> instance variable
void setup() {
Node a = new Node("123");
Node b = new Node("456");
Node c = new Node("789");
Stack s = new Stack();
s.push(a);
abstract class Pokemon extends GameObject{
int currentHP;
int maxHP;
PImage leftImg, rightImg;
float yVel;
float GRAV = .5;
float xVel;
float xAcc;
void moveRight() {