Skip to content
This repository has been archived by the owner on Aug 2, 2020. It is now read-only.

Commit

Permalink
build 1.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
iamtakagi committed May 21, 2020
1 parent d06c624 commit 94e4e1f
Show file tree
Hide file tree
Showing 104 changed files with 36 additions and 16 deletions.
Binary file modified .gradle/5.2.1/executionHistory/executionHistory.bin
Binary file not shown.
Binary file modified .gradle/5.2.1/executionHistory/executionHistory.lock
Binary file not shown.
Binary file modified .gradle/5.2.1/fileHashes/fileHashes.bin
Binary file not shown.
Binary file modified .gradle/5.2.1/fileHashes/fileHashes.lock
Binary file not shown.
Binary file modified .gradle/buildOutputCleanup/buildOutputCleanup.lock
Binary file not shown.
Binary file modified .gradle/buildOutputCleanup/outputFiles.bin
Binary file not shown.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ apply plugin: 'kotlin'
apply plugin: 'application'

group 'me.notsmatch.teambot'
version '1.0.1-SNAPSHOT'
version '1.0.2-SNAPSHOT'
mainClassName = "me.notsmatch.teambot.Main"

repositories {
Expand Down
Binary file not shown.
Binary file not shown.
Binary file modified build/kotlin/compileKotlin/build-history.bin
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/proto.tab
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/subtypes.tab
Binary file not shown.
Binary file not shown.
Binary file modified build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/supertypes.tab
Binary file not shown.
Binary file not shown.
4 changes: 2 additions & 2 deletions build/kotlin/compileKotlin/caches-jvm/lookups/counters.tab
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
18
10
31
23
Binary file modified build/kotlin/compileKotlin/caches-jvm/lookups/file-to-id.tab
Binary file not shown.
Binary file not shown.
Binary file modified build/kotlin/compileKotlin/caches-jvm/lookups/id-to-file.tab
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified build/kotlin/compileKotlin/caches-jvm/lookups/id-to-file.tab.len
Binary file not shown.
Binary file not shown.
Binary file modified build/kotlin/compileKotlin/caches-jvm/lookups/id-to-file.tab_i
Binary file not shown.
Binary file modified build/kotlin/compileKotlin/caches-jvm/lookups/lookups.tab
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified build/kotlin/compileKotlin/caches-jvm/lookups/lookups.tab.len
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
�C�.�*�!��
Binary file modified build/kotlin/compileKotlin/caches-jvm/lookups/lookups.tab_i
Binary file not shown.
Binary file modified build/kotlin/compileKotlin/last-build.bin
Binary file not shown.
Binary file added build/kotlin/compileTestKotlin/build-history.bin
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
17
16
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added build/kotlin/compileTestKotlin/last-build.bin
Binary file not shown.
Binary file added build/libs/mk8dx-teambot-1.0.2-SNAPSHOT.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion build/tmp/fatJar/MANIFEST.MF
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Manifest-Version: 1.0
Implementation-Title: mk8dx-teambot
Implementation-Version: 1.0.1-SNAPSHOT
Implementation-Version: 1.0.2-SNAPSHOT
Main-Class: me.notsmatch.teambot.Main

41 changes: 29 additions & 12 deletions src/main/kotlin/me/notsmatch/teambot/command/TeamCommand.kt
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,22 @@ import me.notsmatch.teambot.util.TeamUtils
import net.dv8tion.jda.api.EmbedBuilder
import org.apache.commons.lang3.StringUtils
import java.awt.Color
import kotlin.math.ceil
import kotlin.math.round

class TeamCommand : Command() {

init {
this.name = "t"
this.help = "チーム分けをします"
this.arguments = "<チーム数> <name1> <name2> <name3>..."
this.help = "チーム分けをします\nチーム形式\n2: 2v2\n3: 3v3\n4: 4v4\n5: 5v5\n6: 6v6"
this.arguments = "<チーム形式> <name1> <name2> <name3>..."
}

override fun execute(event: CommandEvent?) {
event?.apply {
val args = StringUtils.split(args)

var makeTeamSize: Int = 0
var teamType: Int = 0
if (args.isNotEmpty()) {

if(!NumberUtils.isInteger(args[0])){
Expand All @@ -32,21 +34,33 @@ class TeamCommand : Command() {
null,
null
)
setDescription("チーム数は1~6で指定してください\n``_t <チーム数> <name1> <name2> <name3>...``")
setDescription("チーム形式は2~6で指定してください\n``_t <チーム形式> <name1> <name2> <name3>...``\n" +
"チーム形式\n" +
"2: 2v2\n" +
"3: 3v3\n" +
"4: 4v4\n" +
"5: 5v5\n" +
"6: 6v6")
}.build())
}

makeTeamSize = args[0].toInt()
teamType = args[0].toInt()

if(makeTeamSize > 6 || makeTeamSize < 1){
if(teamType > 6 || teamType < 2){
return reply(EmbedBuilder().apply {
setColor(Color.RED)
setAuthor(
"Error",
null,
null
)
setDescription("チーム数は1~6で指定してください\n``_t <チーム数> <name1> <name2> <name3>...``")
setDescription("チーム形式は2~6で指定してください\n``_t <チーム形式> <name1> <name2> <name3>...``\n" +
"チーム形式\n" +
"2: 2v2\n" +
"3: 3v3\n" +
"4: 4v4\n" +
"5: 5v5\n" +
"6: 6v6")
}.build())
}
}
Expand All @@ -73,20 +87,23 @@ class TeamCommand : Command() {
}.build())
}

// 格納用

val makeTeamSize = (players.size + teamType - 1 ) / teamType

val teams = TeamUtils.compose(players, makeTeamSize)

//結果出力
reply(EmbedBuilder().apply {
setColor(Color.YELLOW)
setAuthor(
"チーム分け結果",
"チーム分け結果" + "(" + teamType + "v" + teamType + ")",
null,
null
)
for(i in teams.indices){
val team = teams[i]
addField(AlphabetUtils.getAlphabet(i).toUpperCase() + " (" + team.size + ")", team.toString().replace("[", "").replace("]", ""), true);
var i = 0
teams.filter { team -> team.isNotEmpty() }.forEach{ team ->
addField(AlphabetUtils.getAlphabet(i).toUpperCase() + " (" + team.size + ")", team.toString().replace("[", "").replace("]", ""), true)
i++
}
}.build())
}
Expand Down

0 comments on commit 94e4e1f

Please sign in to comment.