This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
class markov_node: | |
def __init__(self, name, outcomes): | |
self.name = name | |
self.probability = 0.0 | |
self.incoming_probability = 0.0 | |
self.outcomes = outcomes | |
def push(self): | |
for (probability, node) in self.outcomes: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System.Collections; | |
public class BusController : MonoBehaviour | |
{ | |
protected static readonly float ATTACK_MODIFIER = 7f; | |
protected static readonly float FLIGHT_MODIFIER = 250f; | |
protected static readonly float BRAKE_MODIFIER = -0.7f; | |
protected static readonly float PITCH_CORRECT_TARGET_TIME = 0.2f; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
class QMN: | |
def __init__(self, streak, total, chance): | |
self.streak = streak | |
self.total = total | |
self.chance = chance | |
def childNodes(self): | |
enemyChance = 0.1 * (self.streak + 1) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections.Generic; | |
using UnityEngine; | |
[System.Serializable] | |
public abstract class AutoInstantiate<T> where T : Object | |
{ | |
[SerializeField] | |
private T data; | |
#if UNITY_EDITOR |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import random | |
_memoize = [] | |
def fac(x): | |
if x < 0: | |
return 1 | |
if len(_memoize) <= x: | |
_memoize.append(1 if x == 0 else x * fac(x - 1)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System.Collections; | |
public class GlobalSomething : MonoBehavior { | |
public static GlobalSomething Singleton; | |
public void Awake() { | |
Singleton = this; | |
} |