Skip to content

Instantly share code, notes, and snippets.

View QuantumFractal's full-sized avatar

Thomas Moll QuantumFractal

View GitHub Profile
@QuantumFractal
QuantumFractal / GameTest.java
Last active August 29, 2015 13:57
ComS 227 Game Tester
package hw2;
import static org.junit.Assert.*;
import org.junit.Before;
import org.junit.Test;
import java.io.File;
import java.io.FileNotFoundException;
import java.util.Random;
@QuantumFractal
QuantumFractal / ExamReviewSolutions.java
Last active August 29, 2015 13:58
Java 227 - Exam 2 Review Guide Solutions
package exam2review;
import java.util.ArrayList;
/*
* <<<<NOTE>>>>>>>
* Please work the review on your OWN first! It will help your understanding immensely.
* only use this guide to check your own work.
*
* To Use:
* -Make a package called "exam2review".
@QuantumFractal
QuantumFractal / OnePairEvaluatorTest.java
Created April 27, 2014 03:10
ONePairEvaluatorTest
package hw3;
import static org.junit.Assert.*;
import java.util.Arrays;
import org.junit.Before;
import org.junit.Test;
import api.Card;
@QuantumFractal
QuantumFractal / Battle.java
Created May 5, 2014 15:46
Spaceship simulator
package galaxy;
import java.util.ArrayList;
public class Battle {
public static void main(String[] args)
{
//Make an arraylist of ships!
ArrayList<Spaceship> ships = new ArrayList<Spaceship>();
@QuantumFractal
QuantumFractal / Command.py
Last active August 29, 2015 14:04
Design Patterns
'''
This is my implementation of the Command design pattern.
It decouples simple actions into a "Command" class that is
inherited by FireCommand, etc.
Written in python for simplicity sake.
For more info >> http://gameprogrammingpatterns.com/command.html
'''
@QuantumFractal
QuantumFractal / WhyNotStreetLamps.py
Last active August 29, 2015 14:04
Random Python Code
# Streetlamp simulator... I don't know why I made this
# Enjoy the simplicity of being a streetlamp
#
# licensed under the GNU GPL. Not to be distributed for monetary gain.
class Lamppost:
def __init__(self, initial_state = False):
self.state = initial_state
self.color = (1,1,1)
( ͡° ͜ʖ ͡°)
This is for later. Disregard.
@QuantumFractal
QuantumFractal / DiscrepancyTest.java
Last active August 29, 2015 14:06
CS228 Project 2 Unit Tests
package edu.iastate.cs228.hw2;
import org.junit.Test;
import org.junit.Before;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.assertEquals;
/**
* @author ThomasMol
@QuantumFractal
QuantumFractal / totally-not-procrastinating.py
Created May 4, 2015 22:19
Should Be Studying but Instead; Gist!
import random
things_to_do = ['Study', 'No really, study','Play video games','Nap',
'Study Break', 'Do python', 'Watch Netflix']
print random.choice(things_to_do)