Skip to content

Instantly share code, notes, and snippets.

View FailingCode.java
import java.util.Random;
class FuzzedClass_202 {
public void test() {
{
long var1;
System.out.println("Hi");
if (new Random().nextBoolean())
{
System.out.println("Hi");
System.out.println("Hi");
@Kroppeb
Kroppeb / hi.ts
Created Feb 17, 2022
Voidpet mood levels decision tree
View hi.ts
function predictor({adrenaline, noradrenaline, dopamine, serotonin, endorphins}: levels) {
if (adrenaline >= 90 && adrenaline !== 100) return 'is super pumped.';
if (noradrenaline >= 90 && noradrenaline !== 100) return 'is sharp and ready.';
if (serotonin >= 90 && serotonin !== 100) return 'is totally vibing out.';
if (dopamine >= 90 && dopamine !== 100) return 'is feeling like a boss.';
if (endorphins >= 90 && endorphins !== 100) return 'is giddy with excitement.';
if (dopamine < -80 && serotonin < -80) {
if (adrenaline > 80) return "is on the verge of a panic attack.";
if (adrenaline < -80 && endorphins < -80) return "is having a no good, very bad day.";
View biome.groovy
/*
* $xxx = Identifier // Registry for xxx
* $|xxx = ($xxx | xxx)
*/
Biome{
// inline enum
precipitation: ("none"|"rain"|"snow")
// reference enum
category: Biome.Category
View kotlinStarterAI.kt
import kotlin.math.*
import java.util.*
data class Coord(val x: Int, val y: Int) {
constructor(input: Scanner) : this(input.nextInt(), input.nextInt())
operator fun plus(other: Coord): Coord {
@Kroppeb
Kroppeb / ancient_knights_code.py
Last active Nov 15, 2018 — forked from ashtonmv/ancient_knights_code.py
The Ancient Knights Code
View ancient_knights_code.py
class Knight:
def __init__(self, name):
self.name = name
self.l = len(name)
self.honor = 0
def quest1(self):
if self.l > 6:
self.honor += 1
View ccb.js
// --- Calculator
function Calculator () {
this.schema = [
{
objects: function () {
return Game.UpgradesInStore.filter(function(e) {
return ([
64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 84, 85, 87, 141, // bingo upgrades
182, 183, 184, 185 // season switchers
].indexOf(e.id) < 0);