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
package com.example | |
import org.junit.Assert.assertEquals | |
import org.junit.Assert.assertThrows | |
import org.junit.Test | |
import org.junit.function.ThrowingRunnable | |
/** | |
* JUnit 4.13 test | |
*/ |
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.CoroutineExceptionHandler | |
import kotlinx.coroutines.CoroutineScope | |
import kotlinx.coroutines.Job | |
import kotlinx.coroutines.SupervisorJob | |
import kotlinx.coroutines.async | |
import kotlinx.coroutines.delay | |
import kotlinx.coroutines.launch | |
import kotlinx.coroutines.runBlocking | |
fun main() = |
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
val setup = """ | |
ℹ️ SETUP | |
Set up the Age I cards like in a normal game, but sit so you're facing the first row of cards in the structure. | |
The zone to the left of the card structure is your City. The zone to the right of the structure is the Leader's City. Begin the game by giving 7 coins to yourself and none to the Leader. | |
Shuffle all the Wonder cards and draw 3. Choose 2 of these cards for yourself and give the third to the Leader. | |
Do this a second time. You will therefore start with 4 Wonder cards in your city and 2 in the Leader's City. | |
The Leader's 2 Wonder cards are treated as if already constructed. Immediately apply the following effects if they are on the Leader's Wonders: |
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
// Run with: | |
// kotlinc -script script.main.kts | |
@file:Repository("https://jcenter.bintray.com") | |
@file:DependsOn("io.uniflow:uniflow-core:0.11.6") | |
@file:DependsOn("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.5") | |
import io.uniflow.core.flow.* | |
import io.uniflow.core.flow.data.UIEvent | |
import io.uniflow.core.flow.data.UIState |
OlderNewer