Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

To claim this, I am signing this object:

@chheller
chheller / Phileas.js
Last active May 22, 2017 06:20
A first draft for a runescape discord bot.
require('dotenv').config();
const Discord = require('discord.js');
const client = new Discord.Client();
const rsapi = require('runescape-api');
const fs = require('fs');
let mainChan;
@chheller
chheller / Voxyl.cs
Last active May 3, 2017 07:04
Initial draft of a tool for generating graphs in 3D space as an effect for Unity
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Voxyl : MonoBehaviour {
public GameObject Target;
public GameObject GraphLine;
public Vector3 Scale;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class DiceHandler : MonoBehaviour {
public GameObject Die;
public float ThrowStrength;
public int Count;
public static DiceHandler Instance;
@chheller
chheller / Assignment5.java
Created March 8, 2017 08:26
An old algorithms assignment. On a single line there is a start and end point, as well as a collection of coins. This algorithm returns the minimum amount of time it takes to collect every coin and get to the goal. Additionally, coin increase move speed.
import java.util.ArrayList;
import java.util.Collections;
public class Assignment5 {
// Establish useful global variables
private static int gEnd;
private static int gBegin;
// helper distance function
public static double distance(double posA, double posB, int movespeed) {
@chheller
chheller / Driver.java
Created March 8, 2017 08:20
An implementation of BFS to solve a classic sliding puzzle problem.
package main;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.LinkedList;
import java.util.Queue;
import java.util.TreeSet;
class StateComparator implements Comparator<State> {
@chheller
chheller / MiniMax.cs
Created March 8, 2017 08:12
This is an implementation of MiniMax for Tic Tac Toe in C#. It's pretty simple, fairly crude, but works. The entire code is sourced, and should build after pasting.
using System;
using System.Linq;
namespace Minimax
{
class Game
{
static char[] board;
static bool isPlayerTurn;
static char CPUSymbol = 'X';