This file contains 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
import java.util.ArrayList; | |
import java.util.Arrays; | |
import java.util.List; | |
import java.util.Objects; | |
class Scratch { | |
public static void main(String[] args) { | |
Player p = new Player(); | |
NPC npc = new NPC(1234); | |
Dialogues d = new Dialogues(p); |
This file contains 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
import kotlinx.coroutines.* | |
import org.apache.commons.text.StringEscapeUtils | |
import java.io.InputStream | |
import java.nio.charset.Charset | |
import java.util.concurrent.TimeUnit | |
import kotlin.coroutines.CoroutineContext | |
data class CommandResult( | |
val exitCode: Int, | |
val response: String? = null, |
This file contains 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
import kotlin.math.abs | |
interface Entity | |
data class Ai(var x: Int, var y: Int) : Entity | |
data class Position(val x: Int, val y: Int) : Entity | |
open class Context(val entity: Ai) { | |
val last: Option<*, *>? = null |
This file contains 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
import kotlin.random.Random | |
import kotlin.system.measureNanoTime | |
val columns = 64 | |
val rows = 64 | |
val percent = 0.3 | |
val distances = Array(columns) { Array(rows) { -1.0 } } | |
val collision = Array(columns) { Array(rows) { Random.nextDouble() < percent } } | |
val startX = 0 |
This file contains 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
import com.fasterxml.jackson.core.JsonFactory | |
import com.fasterxml.jackson.databind.ObjectMapper | |
import com.fasterxml.jackson.databind.node.ObjectNode | |
import java.io.BufferedReader | |
import java.io.File | |
import java.io.InputStreamReader | |
import java.util.stream.Collectors | |
object GithubIssueCloner { |