Skip to content

Instantly share code, notes, and snippets.

View rorosaurus's full-sized avatar

Rory Hayes rorosaurus

View GitHub Profile
@rorosaurus
rorosaurus / keybase.md
Created March 21, 2017 18:56
Proving my GitHub identity

Keybase proof

I hereby claim:

  • I am rorosaurus on github.
  • I am rorosaurus (https://keybase.io/rorosaurus) on keybase.
  • I have a public key whose fingerprint is 2813 3EFA 19FA 5FA8 B131 CD32 889B 0570 2DB9 E730

To claim this, I am signing this object:

@rorosaurus
rorosaurus / exploding-kittens-house-rules.md
Last active August 25, 2015 23:25
Exploding Kittens House Rules

Exploding Kittens: House Rules

We play with the usual rules, plus the following modifiers.

Exploding Kittens

  • If you dodge an explosion, everyone else has to drink
  • If you draw an exploding kitten, you drink (no matter how it ends)

Defuse Cards

  • Can be NOPE'd
public static void main(String args[]){
final int startingShot = 1;
ArrayList<Integer> startingList = new ArrayList<Integer>();
// fill list with shots
for(int i=0;i<1024;i++){
startingList.add(i, i+1);
}
// This F# dojo is directly inspired by the
// Digit Recognizer competition from Kaggle.com:
// http://www.kaggle.com/c/digit-recognizer
// The datasets below are simply shorter versions of
// the training dataset from Kaggle.
// The goal of the dojo will be to
// create a classifier that uses training data
// to recognize hand-written digits, and
// evaluate the quality of our classifier
@rorosaurus
rorosaurus / AI.java
Last active December 14, 2015 07:59
A short snippet of part of our AI.java file for Botnet.
// if you own that virus
if(viruses[i].getOwner() == playerID())
{
//if tile is captured but not occupied
if(viruses[i].getX() > 0 && !intersectBase(viruses[i].getX()-1, viruses[i].getY(), bases) && getTileAtLocation(viruses[i].getX()-1, viruses[i].getY()).getOwner() == enemyID) {
viruses[i].move(viruses[i].getX()-1, viruses[i].getY());
} else if(viruses[i].getX() < width()-1 && !intersectBase(viruses[i].getX()+1, viruses[i].getY(), bases) && getTileAtLocation(viruses[i].getX()+1, viruses[i].getY()).getOwner() == enemyID) {
viruses[i].move(viruses[i].getX()+1, viruses[i].getY());
} else if(viruses[i].getY() > 0 && !intersectBase(viruses[i].getX(), viruses[i].getY()-1, bases) && getTileAtLocation(viruses[i].getX(), viruses[i].getY()-1).getOwner() == enemyID) {
viruses[i].move(viruses[i].getX(), viruses[i].getY()-1);