-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0dad9e9
commit 3c0a900
Showing
103 changed files
with
113 additions
and
3,830 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,28 @@ | ||
# Caves of Zircon | ||
|
||
A roguelike tutorial project using Zircon which is a spiritual successor of Caves of Clojure and Trystan's roguelike tutorial. | ||
## Usage | ||
|
||
You need to install *Java* (JDK) on your computer before you can build Caves of Zircon. | ||
Alternatively you can use one of the releases [here](https://github.com/Hexworks/caves-of-zircon/releases) for | ||
which a JRE will suffice. | ||
|
||
```java | ||
git clone https://github.com/Hexworks/caves-of-zircon.git | ||
cd caves-of-zircon | ||
./gradlew clean build | ||
java -jar build/libs/caves-of-zircon-2018.1.0-PREVIEW.jar | ||
``` | ||
|
||
## Tutorial notes | ||
|
||
- Explain why components are objects -> why immutability is good | ||
- Explain `reified` | ||
- Improve destructuring (property name is at end, custom fields at front) | ||
- Explain extension functions over `Entity` and others and their purpose | ||
- Events with `EventBus` (remove entity) | ||
- Explain `data class`es (destructuring the event) | ||
- Introduce databinding (cobalt) | ||
- Add `sameLevelNeighbors` and explain the utility of extension functions | ||
- Introduce tile variations | ||
- Explain why using functions is better than variables (`FLOOR` TO `floor()` when `Variation` is added) | ||
- Introduce extension functions on nullable types |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,96 @@ | ||
allprojects { | ||
group "org.hexworks.cavesofzircon" | ||
version "2018.1.0-PREVIEW" | ||
|
||
buildscript { | ||
ext.kotlinVersion = "1.3.10" | ||
repositories { | ||
mavenLocal() | ||
mavenCentral() | ||
jcenter() | ||
maven { url "https://plugins.gradle.org/m2/" } | ||
} | ||
dependencies { | ||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion" | ||
} | ||
} | ||
|
||
ext { | ||
zirconVersion = "2018.5.32-PREVIEW" | ||
junitVersion = "4.12" | ||
mockitoVersion = "1.10.19" | ||
assertjVersion = "3.6.2" | ||
slf4jVersion = "1.7.25" | ||
cobaltVersion = "2018.0.14-BETA" | ||
|
||
libraries = [ | ||
kotlin_stdlib : "org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion", | ||
kotlin_reflect : "org.jetbrains.kotlin:kotlin-reflect:$kotlinVersion", | ||
slf4j_api : "org.slf4j:slf4j-api:$slf4jVersion", | ||
slf4j_simple : "org.slf4j:slf4j-simple:$slf4jVersion", | ||
cobalt_databinding: "org.hexworks.cobalt:cobalt.databinding-jvm:$cobaltVersion", | ||
zircon_core : "org.hexworks.zircon:zircon.core-jvm:$zirconVersion", | ||
zircon_swing : "org.hexworks.zircon:zircon.jvm.swing:$zirconVersion", | ||
junit : "junit:junit:$junitVersion", | ||
mockito : "org.mockito:mockito-all:$mockitoVersion", | ||
assertj : "org.assertj:assertj-core:$assertjVersion" | ||
] | ||
} | ||
group "org.hexworks.cavesofzircon" | ||
version "2018.1.0-PREVIEW" | ||
|
||
buildscript { | ||
ext.kotlinVersion = "1.3.10" | ||
repositories { | ||
mavenLocal() | ||
mavenCentral() | ||
jcenter() | ||
maven { url 'https://jitpack.io' } | ||
maven { url "https://plugins.gradle.org/m2/" } | ||
} | ||
dependencies { | ||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion" | ||
classpath "com.github.jengelman.gradle.plugins:shadow:4.0.2" | ||
} | ||
} | ||
|
||
ext { | ||
zirconVersion = "2018.5.32-PREVIEW" | ||
junitVersion = "4.12" | ||
mockitoVersion = "1.10.19" | ||
assertjVersion = "3.6.2" | ||
slf4jVersion = "1.7.25" | ||
cobaltVersion = "2018.0.14-BETA" | ||
|
||
libraries = [ | ||
kotlin_stdlib : "org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion", | ||
kotlin_reflect : "org.jetbrains.kotlin:kotlin-reflect:$kotlinVersion", | ||
slf4j_api : "org.slf4j:slf4j-api:$slf4jVersion", | ||
slf4j_simple : "org.slf4j:slf4j-simple:$slf4jVersion", | ||
cobalt_databinding: "org.hexworks.cobalt:cobalt.databinding-jvm:$cobaltVersion", | ||
zircon_core : "org.hexworks.zircon:zircon.core-jvm:$zirconVersion", | ||
zircon_swing : "org.hexworks.zircon:zircon.jvm.swing:$zirconVersion", | ||
junit : "junit:junit:$junitVersion", | ||
mockito : "org.mockito:mockito-all:$mockitoVersion", | ||
assertj : "org.assertj:assertj-core:$assertjVersion" | ||
] | ||
} | ||
|
||
repositories { | ||
mavenLocal() | ||
mavenCentral() | ||
jcenter() | ||
maven { url 'https://jitpack.io' } | ||
} | ||
|
||
apply plugin: 'kotlin' | ||
apply plugin: "com.github.johnrengelman.shadow" | ||
|
||
configurations { | ||
shadow | ||
compile.extendsFrom provided | ||
provided.extendsFrom shadow | ||
} | ||
|
||
shadowJar { | ||
classifier = null | ||
version = version | ||
} | ||
|
||
artifacts { | ||
archives shadowJar | ||
} | ||
|
||
jar { | ||
manifest { | ||
attributes 'Main-Class': "org.hexworks.cavesofzircon.MainKt" | ||
} | ||
} | ||
|
||
build.dependsOn(shadowJar) | ||
|
||
dependencies { | ||
compile libraries.kotlin_stdlib | ||
compile libraries.kotlin_reflect | ||
|
||
compile libraries.slf4j_api | ||
|
||
compile 'ch.qos.logback:logback-classic:1.2.3' | ||
compile 'ch.qos.logback:logback-core:1.2.3' | ||
|
||
compile libraries.cobalt_databinding | ||
compile libraries.zircon_core | ||
compile libraries.zircon_swing | ||
|
||
testCompile libraries.junit | ||
testCompile libraries.mockito | ||
testCompile libraries.assertj | ||
} | ||
|
||
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all { | ||
kotlinOptions { | ||
jvmTarget = "1.8" | ||
} | ||
} | ||
|
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.