Code cleanup
This commit is contained in:
parent
55f279c9b1
commit
c138971230
6 changed files with 13 additions and 3 deletions
2
.idea/codeStyles/codeStyleConfig.xml
generated
2
.idea/codeStyles/codeStyleConfig.xml
generated
|
@ -1,5 +1,5 @@
|
||||||
<component name="ProjectCodeStyleConfiguration">
|
<component name="ProjectCodeStyleConfiguration">
|
||||||
<state>
|
<state>
|
||||||
<option name="USE_PER_PROJECT_SETTINGS" value="true" />
|
<option name="PREFERRED_PROJECT_CODE_STYLE" value="Default" />
|
||||||
</state>
|
</state>
|
||||||
</component>
|
</component>
|
6
.idea/kotlinc.xml
generated
Normal file
6
.idea/kotlinc.xml
generated
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="KotlinJpsPluginSettings">
|
||||||
|
<option name="version" value="1.7.10" />
|
||||||
|
</component>
|
||||||
|
</project>
|
|
@ -282,11 +282,13 @@ class Mobibot(nickname: String, val channel: String, logsDirPath: String, p: Pro
|
||||||
// Output the usage
|
// Output the usage
|
||||||
HelpFormatter().printHelp(Mobibot::class.java.name, options)
|
HelpFormatter().printHelp(Mobibot::class.java.name, options)
|
||||||
}
|
}
|
||||||
|
|
||||||
commandLine.hasOption(Constants.VERSION_ARG[0]) -> {
|
commandLine.hasOption(Constants.VERSION_ARG[0]) -> {
|
||||||
// Output the version
|
// Output the version
|
||||||
println("${ReleaseInfo.PROJECT} ${ReleaseInfo.VERSION} (${ReleaseInfo.BUILDDATE.toIsoLocalDate()})")
|
println("${ReleaseInfo.PROJECT} ${ReleaseInfo.VERSION} (${ReleaseInfo.BUILDDATE.toIsoLocalDate()})")
|
||||||
println(ReleaseInfo.WEBSITE)
|
println(ReleaseInfo.WEBSITE)
|
||||||
}
|
}
|
||||||
|
|
||||||
else -> {
|
else -> {
|
||||||
// Load the properties
|
// Load the properties
|
||||||
val p = Properties()
|
val p = Properties()
|
||||||
|
|
|
@ -102,9 +102,11 @@ class RockPaperScissors : AbstractModule() {
|
||||||
hand == botHand -> {
|
hand == botHand -> {
|
||||||
event.respond("${hand.name} vs. ${botHand.name} » You ${"tie".bold()}.")
|
event.respond("${hand.name} vs. ${botHand.name} » You ${"tie".bold()}.")
|
||||||
}
|
}
|
||||||
|
|
||||||
hand.beats(botHand) -> {
|
hand.beats(botHand) -> {
|
||||||
event.respond("${hand.name.bold()} ${hand.action} ${botHand.name} » You ${"win".bold()}!")
|
event.respond("${hand.name.bold()} ${hand.action} ${botHand.name} » You ${"win".bold()}!")
|
||||||
}
|
}
|
||||||
|
|
||||||
else -> {
|
else -> {
|
||||||
event.respond("${botHand.name.bold()} ${botHand.action} ${hand.name} » You ${"lose".bold()}!")
|
event.respond("${botHand.name.bold()} ${botHand.action} ${hand.name} » You ${"lose".bold()}!")
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue