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
(ns dicer.core | |
(:use seesaw.core | |
[clojure.string :only [join trim split]] | |
dicer.prob) | |
(:import org.pushingpixels.substance.api.SubstanceLookAndFeel | |
) | |
(:import org.pushingpixels.substance.api.SubstanceConstants$FocusKind) | |
(:gen-class)) | |
(native!) |
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
(def queen | |
[:range :no :range :no :range | |
:no :range :range :range :no | |
:range :range :self :range :range | |
:no :range :range :range :no | |
:range :no :range :no :range | |
]) |
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
;; Redistributable under the Apache License | |
;; Authors: Eben Howard and Tommy Ettinger | |
;;"Alice Blue" | |
(def alice-blue 0xf0f8ff) | |
;;"Alizarin" | |
(def alizarin 0xE32636) | |
;;"Aloewood" | |
(def aloewood 0x6A432D) | |
;;"Aloewood Brown" |
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
(ns opal.dbpedia | |
(:use [clojure.tools.logging :only [log]]) | |
(:require [clojure.java.io :as io]) | |
(:import [uk.ac.manchester.cs.owl.owlapi.turtle.parser TurtleParser] | |
[org.neo4j.graphdb Label] | |
[org.neo4j.index.lucene.unsafe.batchinsert LuceneBatchInserterIndexProvider] | |
[org.neo4j.unsafe.batchinsert BatchInserters] | |
[org.neo4j.graphdb DynamicRelationshipType])) | |
;; PARSING METHODS |
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
;; This code needs to be removed | |
;; (def open (atom {})) | |
(defn dijkstra | |
([a] | |
(do (dijkstra a (find-walls a) (find-lowest a)))) | |
([a closed open-cells] | |
(let [open (transient open-cells)] | |
(while (not (empty? open)) | |
(let [newly-open (transient {})] |
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
{ | |
"nil": { | |
"description": "Nothingness (from tiles.yml)", | |
"glyph": " ", | |
"day_color": { | |
"between": [ | |
"black", | |
"black" | |
], | |
"mix": [ |
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
import squid.squidgrid.map.HerringboneDungeon; | |
public class DungeonTest | |
{ | |
public static void main(String[] args) | |
{ | |
HerringboneDungeon hbd = new HerringboneDungeon(80,20); | |
System.out.println(hbd); | |
} | |
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
(defn multiple-trials [m n] | |
( loop [m m acc []] | |
(if (> m 0) | |
(recur (dec m) (conj acc (compute-winnings-for-a-trial n))) | |
acc))) |
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
;; Usage instructions: lein run fontname.ttf 16 0x000000 | |
;; change fontname.ttf to a font file's name, 16 to the font size you want, and 0x000000 to a color in RGB format. | |
(ns fontstuff.core | |
(:use [clojure.string :only [join trim split]]) | |
(:import [java.awt Font Graphics2D RenderingHints Color Rectangle Shape FontMetrics] | |
[java.awt.font FontRenderContext GlyphVector TextLayout] | |
[java.awt.image BufferedImage] | |
[java.awt.geom Rectangle2D] | |
[java.io File] | |
[javax.imageio ImageIO]) |
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
package commanders.unite.utils | |
import com.badlogic.gdx.graphics.Camera; | |
import com.badlogic.gdx.graphics.OrthographicCamera; | |
import com.badlogic.gdx.utils.viewport.Viewport | |
; | |
/** | |
* Created by Tommy Ettinger on 8/1/2014. | |
*/ |
OlderNewer