Code cleanup
This commit is contained in:
parent
55f279c9b1
commit
c138971230
6 changed files with 13 additions and 3 deletions
|
@ -103,7 +103,7 @@ public final class War extends AbstractModule {
|
|||
result = bold("tie") + ". This means " + bold("WAR");
|
||||
}
|
||||
|
||||
event.respond(DECK[RANDOM.nextInt(DECK.length)][i] + " " + DECK[RANDOM.nextInt(DECK.length)][y] +
|
||||
event.respond(DECK[RANDOM.nextInt(DECK.length)][i] + " " + DECK[RANDOM.nextInt(DECK.length)][y] +
|
||||
" » You " + result + '!');
|
||||
|
||||
} while (i == y);
|
||||
|
|
|
@ -282,11 +282,13 @@ class Mobibot(nickname: String, val channel: String, logsDirPath: String, p: Pro
|
|||
// Output the usage
|
||||
HelpFormatter().printHelp(Mobibot::class.java.name, options)
|
||||
}
|
||||
|
||||
commandLine.hasOption(Constants.VERSION_ARG[0]) -> {
|
||||
// Output the version
|
||||
println("${ReleaseInfo.PROJECT} ${ReleaseInfo.VERSION} (${ReleaseInfo.BUILDDATE.toIsoLocalDate()})")
|
||||
println(ReleaseInfo.WEBSITE)
|
||||
}
|
||||
|
||||
else -> {
|
||||
// Load the properties
|
||||
val p = Properties()
|
||||
|
|
|
@ -43,7 +43,7 @@ class Versions : AbstractCommand() {
|
|||
"Version : ${ReleaseInfo.VERSION} (${ReleaseInfo.BUILDDATE.toIsoLocalDate()})",
|
||||
"Platform : ${System.getProperty("os.name")} ${System.getProperty("os.version")}" +
|
||||
" (${System.getProperty("os.arch")})",
|
||||
"Runtimes : Java ${System.getProperty("java.runtime.version")}, Kotlin " + KotlinVersion.CURRENT
|
||||
"Runtimes : Java ${System.getProperty("java.runtime.version")}, Kotlin " + KotlinVersion.CURRENT
|
||||
)
|
||||
override val name = "versions"
|
||||
override val help = listOf("To view the versions data (bot, platform, java, etc.):", helpFormat("%c $name"))
|
||||
|
|
|
@ -102,9 +102,11 @@ class RockPaperScissors : AbstractModule() {
|
|||
hand == botHand -> {
|
||||
event.respond("${hand.name} vs. ${botHand.name} » You ${"tie".bold()}.")
|
||||
}
|
||||
|
||||
hand.beats(botHand) -> {
|
||||
event.respond("${hand.name.bold()} ${hand.action} ${botHand.name} » You ${"win".bold()}!")
|
||||
}
|
||||
|
||||
else -> {
|
||||
event.respond("${botHand.name.bold()} ${botHand.action} ${hand.name} » You ${"lose".bold()}!")
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue