From b8a4c71c1350acc86d25dd3fae004deb93877529 Mon Sep 17 00:00:00 2001 From: Daoortor Date: Wed, 31 Jul 2024 22:10:48 +0200 Subject: [PATCH] fixes --- .../kotlin/course/alias/card/JsCard.kt | 20 +----------------- .../kotlin/course/alias/util/Converters.kt | 6 ------ .../kotlin/course/alias/util/Converters.kt | 6 ------ .../kotlin/course/alias/util/Converters.kt | 12 ----------- .../kotlin/course/alias/card/JsCard.kt | 20 +----------------- .../kotlin/course/alias/util/Converters.kt | 6 ------ .../kotlin/course/alias/card/JsCard.kt | 20 +----------------- .../kotlin/course/alias/util/Converters.kt | 6 ------ .../kotlin/course/alias/util/Converters.kt | 6 ------ .../kotlin/course/alias/card/JsCard.kt | 20 +----------------- .../kotlin/course/alias/util/Converters.kt | 6 ------ .../kotlin/course/alias/util/Converters.kt | 21 ------------------- .../kotlin/course/alias/card/JsCard.kt | 20 +----------------- .../kotlin/course/alias/util/Converters.kt | 6 ------ .../kotlin/course/alias/card/JsCard.kt | 20 +----------------- .../kotlin/course/alias/util/Converters.kt | 6 ------ .../kotlin/course/alias/util/Converters.kt | 12 ----------- .../kotlin/course/alias/card/JsCard.kt | 20 +----------------- .../kotlin/course/alias/util/Converters.kt | 6 ------ .../kotlin/course/alias/card/JsCard.kt | 20 +----------------- .../kotlin/course/alias/util/Converters.kt | 6 ------ .../kotlin/course/alias/card/JsCard.kt | 20 +----------------- .../kotlin/course/alias/util/Converters.kt | 6 ------ .../kotlin/course/alias/card/JsCard.kt | 20 +----------------- .../kotlin/course/alias/util/Converters.kt | 6 ------ .../kotlin/course/alias/card/JsCard.kt | 20 +----------------- .../kotlin/course/alias/util/Converters.kt | 6 ------ .../course/words/generator/util/Converters.kt | 17 --------------- .../course/words/generator/util/Converters.kt | 1 - .../course/words/generator/util/Converters.kt | 1 - .../words/generator/team/TeamResource.kt | 1 - .../course/words/generator/util/Converters.kt | 6 ------ .../course/words/generator/util/Converters.kt | 6 ------ .../course/words/generator/util/Converters.kt | 6 ------ .../course/words/generator/util/Converters.kt | 8 ------- 35 files changed, 11 insertions(+), 378 deletions(-) delete mode 100644 aliasServer/aliasServerAnnotationsValueClasses/src/main/kotlin/jetbrains/kotlin/course/alias/util/Converters.kt delete mode 100644 aliasServer/aliasServerCard/src/main/kotlin/jetbrains/kotlin/course/alias/util/Converters.kt delete mode 100644 aliasServer/aliasServerCardService/src/main/kotlin/jetbrains/kotlin/course/alias/util/Converters.kt delete mode 100644 aliasServer/aliasServerClasses/src/main/kotlin/jetbrains/kotlin/course/alias/util/Converters.kt delete mode 100644 aliasServer/aliasServerCompanionObject/src/main/kotlin/jetbrains/kotlin/course/alias/util/Converters.kt delete mode 100644 aliasServer/aliasServerConstantsExtensionFunctions/src/main/kotlin/jetbrains/kotlin/course/alias/util/Converters.kt delete mode 100644 aliasServer/aliasServerDataClasses/src/main/kotlin/jetbrains/kotlin/course/alias/util/Converters.kt delete mode 100644 aliasServer/aliasServerFinishGame/src/main/kotlin/jetbrains/kotlin/course/alias/util/Converters.kt delete mode 100644 aliasServer/aliasServerHowToRun/src/main/kotlin/jetbrains/kotlin/course/alias/util/Converters.kt delete mode 100644 aliasServer/aliasServerIntroduction/src/main/kotlin/jetbrains/kotlin/course/alias/util/Converters.kt delete mode 100644 aliasServer/aliasServerMutableList/src/main/kotlin/jetbrains/kotlin/course/alias/util/Converters.kt delete mode 100644 aliasServer/aliasServerMutableMap/src/main/kotlin/jetbrains/kotlin/course/alias/util/Converters.kt delete mode 100644 aliasServer/aliasServerPackages/src/main/kotlin/jetbrains/kotlin/course/alias/util/Converters.kt delete mode 100644 aliasServer/aliasServerTeamService/src/main/kotlin/jetbrains/kotlin/course/alias/util/Converters.kt delete mode 100644 aliasServer/aliasServerTeams/src/main/kotlin/jetbrains/kotlin/course/alias/util/Converters.kt delete mode 100644 aliasServer/aliasServerUtil/src/main/kotlin/jetbrains/kotlin/course/alias/util/Converters.kt delete mode 100644 wordsGeneratorServer/wordsGeneratorServerFinishGame/src/main/kotlin/jetbrains/kotlin/course/words/generator/util/Converters.kt delete mode 100644 wordsGeneratorServer/wordsGeneratorServerHowToRun/src/main/kotlin/jetbrains/kotlin/course/words/generator/util/Converters.kt delete mode 100644 wordsGeneratorServer/wordsGeneratorServerIntroduction/src/main/kotlin/jetbrains/kotlin/course/words/generator/util/Converters.kt delete mode 100644 wordsGeneratorServer/wordsGeneratorServerTeamService/src/main/kotlin/jetbrains/kotlin/course/words/generator/util/Converters.kt delete mode 100644 wordsGeneratorServer/wordsGeneratorServerTeams/src/main/kotlin/jetbrains/kotlin/course/words/generator/util/Converters.kt delete mode 100644 wordsGeneratorServer/wordsGeneratorServerWord/src/main/kotlin/jetbrains/kotlin/course/words/generator/util/Converters.kt delete mode 100644 wordsGeneratorServer/wordsGeneratorServerWordService/src/main/kotlin/jetbrains/kotlin/course/words/generator/util/Converters.kt diff --git a/aliasServer/aliasServerAnnotationsValueClasses/src/main/kotlin/jetbrains/kotlin/course/alias/card/JsCard.kt b/aliasServer/aliasServerAnnotationsValueClasses/src/main/kotlin/jetbrains/kotlin/course/alias/card/JsCard.kt index 12ae6e13..cb691eba 100644 --- a/aliasServer/aliasServerAnnotationsValueClasses/src/main/kotlin/jetbrains/kotlin/course/alias/card/JsCard.kt +++ b/aliasServer/aliasServerAnnotationsValueClasses/src/main/kotlin/jetbrains/kotlin/course/alias/card/JsCard.kt @@ -3,22 +3,4 @@ package jetbrains.kotlin.course.alias.card data class JsCard( val id: Int, val words: Array -) { - override fun equals(other: Any?): Boolean { - if (this === other) return true - if (javaClass != other?.javaClass) return false - - other as JsCard - - if (id != other.id) return false - if (!words.contentEquals(other.words)) return false - - return true - } - - override fun hashCode(): Int { - var result = id - result = 31 * result + words.contentHashCode() - return result - } -} +) diff --git a/aliasServer/aliasServerAnnotationsValueClasses/src/main/kotlin/jetbrains/kotlin/course/alias/util/Converters.kt b/aliasServer/aliasServerAnnotationsValueClasses/src/main/kotlin/jetbrains/kotlin/course/alias/util/Converters.kt deleted file mode 100644 index 815a21aa..00000000 --- a/aliasServer/aliasServerAnnotationsValueClasses/src/main/kotlin/jetbrains/kotlin/course/alias/util/Converters.kt +++ /dev/null @@ -1,6 +0,0 @@ -package jetbrains.kotlin.course.alias.util - -import jetbrains.kotlin.course.alias.team.JsTeam -import jetbrains.kotlin.course.alias.team.Team - -fun Team.toJsTeam(): JsTeam = JsTeam(this.id, this.points, this.name) diff --git a/aliasServer/aliasServerCard/src/main/kotlin/jetbrains/kotlin/course/alias/util/Converters.kt b/aliasServer/aliasServerCard/src/main/kotlin/jetbrains/kotlin/course/alias/util/Converters.kt deleted file mode 100644 index 815a21aa..00000000 --- a/aliasServer/aliasServerCard/src/main/kotlin/jetbrains/kotlin/course/alias/util/Converters.kt +++ /dev/null @@ -1,6 +0,0 @@ -package jetbrains.kotlin.course.alias.util - -import jetbrains.kotlin.course.alias.team.JsTeam -import jetbrains.kotlin.course.alias.team.Team - -fun Team.toJsTeam(): JsTeam = JsTeam(this.id, this.points, this.name) diff --git a/aliasServer/aliasServerCardService/src/main/kotlin/jetbrains/kotlin/course/alias/util/Converters.kt b/aliasServer/aliasServerCardService/src/main/kotlin/jetbrains/kotlin/course/alias/util/Converters.kt deleted file mode 100644 index 03c11157..00000000 --- a/aliasServer/aliasServerCardService/src/main/kotlin/jetbrains/kotlin/course/alias/util/Converters.kt +++ /dev/null @@ -1,12 +0,0 @@ -package jetbrains.kotlin.course.alias.util - -import jetbrains.kotlin.course.alias.card.Card -import jetbrains.kotlin.course.alias.card.JsCard -import jetbrains.kotlin.course.alias.team.JsTeam -import jetbrains.kotlin.course.alias.team.Team - -fun Card.toJsCard(): JsCard = JsCard(this.id, this.words.map { it.word }.toTypedArray()) - -fun Team.toJsTeam(): JsTeam = JsTeam(this.id, this.points, this.name) - -fun List.toArrayJsTeams() = this.map { it.toJsTeam() }.toTypedArray() diff --git a/aliasServer/aliasServerClasses/src/main/kotlin/jetbrains/kotlin/course/alias/card/JsCard.kt b/aliasServer/aliasServerClasses/src/main/kotlin/jetbrains/kotlin/course/alias/card/JsCard.kt index 12ae6e13..cb691eba 100644 --- a/aliasServer/aliasServerClasses/src/main/kotlin/jetbrains/kotlin/course/alias/card/JsCard.kt +++ b/aliasServer/aliasServerClasses/src/main/kotlin/jetbrains/kotlin/course/alias/card/JsCard.kt @@ -3,22 +3,4 @@ package jetbrains.kotlin.course.alias.card data class JsCard( val id: Int, val words: Array -) { - override fun equals(other: Any?): Boolean { - if (this === other) return true - if (javaClass != other?.javaClass) return false - - other as JsCard - - if (id != other.id) return false - if (!words.contentEquals(other.words)) return false - - return true - } - - override fun hashCode(): Int { - var result = id - result = 31 * result + words.contentHashCode() - return result - } -} +) diff --git a/aliasServer/aliasServerClasses/src/main/kotlin/jetbrains/kotlin/course/alias/util/Converters.kt b/aliasServer/aliasServerClasses/src/main/kotlin/jetbrains/kotlin/course/alias/util/Converters.kt deleted file mode 100644 index 86be9709..00000000 --- a/aliasServer/aliasServerClasses/src/main/kotlin/jetbrains/kotlin/course/alias/util/Converters.kt +++ /dev/null @@ -1,6 +0,0 @@ -package jetbrains.kotlin.course.alias.util - -import jetbrains.kotlin.course.alias.team.JsTeam -import jetbrains.kotlin.course.alias.team.Team - -fun Team.toJsTeam(): JsTeam = TODO("Not implemented yet") diff --git a/aliasServer/aliasServerCompanionObject/src/main/kotlin/jetbrains/kotlin/course/alias/card/JsCard.kt b/aliasServer/aliasServerCompanionObject/src/main/kotlin/jetbrains/kotlin/course/alias/card/JsCard.kt index 12ae6e13..cb691eba 100644 --- a/aliasServer/aliasServerCompanionObject/src/main/kotlin/jetbrains/kotlin/course/alias/card/JsCard.kt +++ b/aliasServer/aliasServerCompanionObject/src/main/kotlin/jetbrains/kotlin/course/alias/card/JsCard.kt @@ -3,22 +3,4 @@ package jetbrains.kotlin.course.alias.card data class JsCard( val id: Int, val words: Array -) { - override fun equals(other: Any?): Boolean { - if (this === other) return true - if (javaClass != other?.javaClass) return false - - other as JsCard - - if (id != other.id) return false - if (!words.contentEquals(other.words)) return false - - return true - } - - override fun hashCode(): Int { - var result = id - result = 31 * result + words.contentHashCode() - return result - } -} +) diff --git a/aliasServer/aliasServerCompanionObject/src/main/kotlin/jetbrains/kotlin/course/alias/util/Converters.kt b/aliasServer/aliasServerCompanionObject/src/main/kotlin/jetbrains/kotlin/course/alias/util/Converters.kt deleted file mode 100644 index 815a21aa..00000000 --- a/aliasServer/aliasServerCompanionObject/src/main/kotlin/jetbrains/kotlin/course/alias/util/Converters.kt +++ /dev/null @@ -1,6 +0,0 @@ -package jetbrains.kotlin.course.alias.util - -import jetbrains.kotlin.course.alias.team.JsTeam -import jetbrains.kotlin.course.alias.team.Team - -fun Team.toJsTeam(): JsTeam = JsTeam(this.id, this.points, this.name) diff --git a/aliasServer/aliasServerConstantsExtensionFunctions/src/main/kotlin/jetbrains/kotlin/course/alias/util/Converters.kt b/aliasServer/aliasServerConstantsExtensionFunctions/src/main/kotlin/jetbrains/kotlin/course/alias/util/Converters.kt deleted file mode 100644 index 815a21aa..00000000 --- a/aliasServer/aliasServerConstantsExtensionFunctions/src/main/kotlin/jetbrains/kotlin/course/alias/util/Converters.kt +++ /dev/null @@ -1,6 +0,0 @@ -package jetbrains.kotlin.course.alias.util - -import jetbrains.kotlin.course.alias.team.JsTeam -import jetbrains.kotlin.course.alias.team.Team - -fun Team.toJsTeam(): JsTeam = JsTeam(this.id, this.points, this.name) diff --git a/aliasServer/aliasServerDataClasses/src/main/kotlin/jetbrains/kotlin/course/alias/card/JsCard.kt b/aliasServer/aliasServerDataClasses/src/main/kotlin/jetbrains/kotlin/course/alias/card/JsCard.kt index 12ae6e13..cb691eba 100644 --- a/aliasServer/aliasServerDataClasses/src/main/kotlin/jetbrains/kotlin/course/alias/card/JsCard.kt +++ b/aliasServer/aliasServerDataClasses/src/main/kotlin/jetbrains/kotlin/course/alias/card/JsCard.kt @@ -3,22 +3,4 @@ package jetbrains.kotlin.course.alias.card data class JsCard( val id: Int, val words: Array -) { - override fun equals(other: Any?): Boolean { - if (this === other) return true - if (javaClass != other?.javaClass) return false - - other as JsCard - - if (id != other.id) return false - if (!words.contentEquals(other.words)) return false - - return true - } - - override fun hashCode(): Int { - var result = id - result = 31 * result + words.contentHashCode() - return result - } -} +) diff --git a/aliasServer/aliasServerDataClasses/src/main/kotlin/jetbrains/kotlin/course/alias/util/Converters.kt b/aliasServer/aliasServerDataClasses/src/main/kotlin/jetbrains/kotlin/course/alias/util/Converters.kt deleted file mode 100644 index 86be9709..00000000 --- a/aliasServer/aliasServerDataClasses/src/main/kotlin/jetbrains/kotlin/course/alias/util/Converters.kt +++ /dev/null @@ -1,6 +0,0 @@ -package jetbrains.kotlin.course.alias.util - -import jetbrains.kotlin.course.alias.team.JsTeam -import jetbrains.kotlin.course.alias.team.Team - -fun Team.toJsTeam(): JsTeam = TODO("Not implemented yet") diff --git a/aliasServer/aliasServerFinishGame/src/main/kotlin/jetbrains/kotlin/course/alias/util/Converters.kt b/aliasServer/aliasServerFinishGame/src/main/kotlin/jetbrains/kotlin/course/alias/util/Converters.kt deleted file mode 100644 index ea0a3745..00000000 --- a/aliasServer/aliasServerFinishGame/src/main/kotlin/jetbrains/kotlin/course/alias/util/Converters.kt +++ /dev/null @@ -1,21 +0,0 @@ -package jetbrains.kotlin.course.alias.util - -import jetbrains.kotlin.course.alias.card.Card -import jetbrains.kotlin.course.alias.card.JsCard -import jetbrains.kotlin.course.alias.results.GameJsResult -import jetbrains.kotlin.course.alias.results.GameResult -import jetbrains.kotlin.course.alias.team.JsTeam -import jetbrains.kotlin.course.alias.team.Team -import jetbrains.kotlin.course.alias.team.TeamService - -fun Card.toJsCard(): JsCard = JsCard(this.id, this.words.map { it.word }.toTypedArray()) - -fun Team.toJsTeam(): JsTeam = JsTeam(this.id, this.points, this.name) - -fun List.toArrayJsTeams() = this.map { it.toJsTeam() }.toTypedArray() - -fun GameJsResult.toGameResult(): GameResult = this.map { - val team = TeamService.teamsStorage[it.id] ?: error("Internal error! Unknown team with id: ${it.id} was received!") - team.points = it.points - team -} diff --git a/aliasServer/aliasServerHowToRun/src/main/kotlin/jetbrains/kotlin/course/alias/card/JsCard.kt b/aliasServer/aliasServerHowToRun/src/main/kotlin/jetbrains/kotlin/course/alias/card/JsCard.kt index 12ae6e13..cb691eba 100644 --- a/aliasServer/aliasServerHowToRun/src/main/kotlin/jetbrains/kotlin/course/alias/card/JsCard.kt +++ b/aliasServer/aliasServerHowToRun/src/main/kotlin/jetbrains/kotlin/course/alias/card/JsCard.kt @@ -3,22 +3,4 @@ package jetbrains.kotlin.course.alias.card data class JsCard( val id: Int, val words: Array -) { - override fun equals(other: Any?): Boolean { - if (this === other) return true - if (javaClass != other?.javaClass) return false - - other as JsCard - - if (id != other.id) return false - if (!words.contentEquals(other.words)) return false - - return true - } - - override fun hashCode(): Int { - var result = id - result = 31 * result + words.contentHashCode() - return result - } -} +) diff --git a/aliasServer/aliasServerHowToRun/src/main/kotlin/jetbrains/kotlin/course/alias/util/Converters.kt b/aliasServer/aliasServerHowToRun/src/main/kotlin/jetbrains/kotlin/course/alias/util/Converters.kt deleted file mode 100644 index 86be9709..00000000 --- a/aliasServer/aliasServerHowToRun/src/main/kotlin/jetbrains/kotlin/course/alias/util/Converters.kt +++ /dev/null @@ -1,6 +0,0 @@ -package jetbrains.kotlin.course.alias.util - -import jetbrains.kotlin.course.alias.team.JsTeam -import jetbrains.kotlin.course.alias.team.Team - -fun Team.toJsTeam(): JsTeam = TODO("Not implemented yet") diff --git a/aliasServer/aliasServerIntroduction/src/main/kotlin/jetbrains/kotlin/course/alias/card/JsCard.kt b/aliasServer/aliasServerIntroduction/src/main/kotlin/jetbrains/kotlin/course/alias/card/JsCard.kt index 12ae6e13..cb691eba 100644 --- a/aliasServer/aliasServerIntroduction/src/main/kotlin/jetbrains/kotlin/course/alias/card/JsCard.kt +++ b/aliasServer/aliasServerIntroduction/src/main/kotlin/jetbrains/kotlin/course/alias/card/JsCard.kt @@ -3,22 +3,4 @@ package jetbrains.kotlin.course.alias.card data class JsCard( val id: Int, val words: Array -) { - override fun equals(other: Any?): Boolean { - if (this === other) return true - if (javaClass != other?.javaClass) return false - - other as JsCard - - if (id != other.id) return false - if (!words.contentEquals(other.words)) return false - - return true - } - - override fun hashCode(): Int { - var result = id - result = 31 * result + words.contentHashCode() - return result - } -} +) diff --git a/aliasServer/aliasServerIntroduction/src/main/kotlin/jetbrains/kotlin/course/alias/util/Converters.kt b/aliasServer/aliasServerIntroduction/src/main/kotlin/jetbrains/kotlin/course/alias/util/Converters.kt deleted file mode 100644 index 86be9709..00000000 --- a/aliasServer/aliasServerIntroduction/src/main/kotlin/jetbrains/kotlin/course/alias/util/Converters.kt +++ /dev/null @@ -1,6 +0,0 @@ -package jetbrains.kotlin.course.alias.util - -import jetbrains.kotlin.course.alias.team.JsTeam -import jetbrains.kotlin.course.alias.team.Team - -fun Team.toJsTeam(): JsTeam = TODO("Not implemented yet") diff --git a/aliasServer/aliasServerMutableList/src/main/kotlin/jetbrains/kotlin/course/alias/util/Converters.kt b/aliasServer/aliasServerMutableList/src/main/kotlin/jetbrains/kotlin/course/alias/util/Converters.kt deleted file mode 100644 index 03c11157..00000000 --- a/aliasServer/aliasServerMutableList/src/main/kotlin/jetbrains/kotlin/course/alias/util/Converters.kt +++ /dev/null @@ -1,12 +0,0 @@ -package jetbrains.kotlin.course.alias.util - -import jetbrains.kotlin.course.alias.card.Card -import jetbrains.kotlin.course.alias.card.JsCard -import jetbrains.kotlin.course.alias.team.JsTeam -import jetbrains.kotlin.course.alias.team.Team - -fun Card.toJsCard(): JsCard = JsCard(this.id, this.words.map { it.word }.toTypedArray()) - -fun Team.toJsTeam(): JsTeam = JsTeam(this.id, this.points, this.name) - -fun List.toArrayJsTeams() = this.map { it.toJsTeam() }.toTypedArray() diff --git a/aliasServer/aliasServerMutableMap/src/main/kotlin/jetbrains/kotlin/course/alias/card/JsCard.kt b/aliasServer/aliasServerMutableMap/src/main/kotlin/jetbrains/kotlin/course/alias/card/JsCard.kt index 12ae6e13..cb691eba 100644 --- a/aliasServer/aliasServerMutableMap/src/main/kotlin/jetbrains/kotlin/course/alias/card/JsCard.kt +++ b/aliasServer/aliasServerMutableMap/src/main/kotlin/jetbrains/kotlin/course/alias/card/JsCard.kt @@ -3,22 +3,4 @@ package jetbrains.kotlin.course.alias.card data class JsCard( val id: Int, val words: Array -) { - override fun equals(other: Any?): Boolean { - if (this === other) return true - if (javaClass != other?.javaClass) return false - - other as JsCard - - if (id != other.id) return false - if (!words.contentEquals(other.words)) return false - - return true - } - - override fun hashCode(): Int { - var result = id - result = 31 * result + words.contentHashCode() - return result - } -} +) diff --git a/aliasServer/aliasServerMutableMap/src/main/kotlin/jetbrains/kotlin/course/alias/util/Converters.kt b/aliasServer/aliasServerMutableMap/src/main/kotlin/jetbrains/kotlin/course/alias/util/Converters.kt deleted file mode 100644 index 815a21aa..00000000 --- a/aliasServer/aliasServerMutableMap/src/main/kotlin/jetbrains/kotlin/course/alias/util/Converters.kt +++ /dev/null @@ -1,6 +0,0 @@ -package jetbrains.kotlin.course.alias.util - -import jetbrains.kotlin.course.alias.team.JsTeam -import jetbrains.kotlin.course.alias.team.Team - -fun Team.toJsTeam(): JsTeam = JsTeam(this.id, this.points, this.name) diff --git a/aliasServer/aliasServerPackages/src/main/kotlin/jetbrains/kotlin/course/alias/card/JsCard.kt b/aliasServer/aliasServerPackages/src/main/kotlin/jetbrains/kotlin/course/alias/card/JsCard.kt index 12ae6e13..cb691eba 100644 --- a/aliasServer/aliasServerPackages/src/main/kotlin/jetbrains/kotlin/course/alias/card/JsCard.kt +++ b/aliasServer/aliasServerPackages/src/main/kotlin/jetbrains/kotlin/course/alias/card/JsCard.kt @@ -3,22 +3,4 @@ package jetbrains.kotlin.course.alias.card data class JsCard( val id: Int, val words: Array -) { - override fun equals(other: Any?): Boolean { - if (this === other) return true - if (javaClass != other?.javaClass) return false - - other as JsCard - - if (id != other.id) return false - if (!words.contentEquals(other.words)) return false - - return true - } - - override fun hashCode(): Int { - var result = id - result = 31 * result + words.contentHashCode() - return result - } -} +) diff --git a/aliasServer/aliasServerPackages/src/main/kotlin/jetbrains/kotlin/course/alias/util/Converters.kt b/aliasServer/aliasServerPackages/src/main/kotlin/jetbrains/kotlin/course/alias/util/Converters.kt deleted file mode 100644 index 86be9709..00000000 --- a/aliasServer/aliasServerPackages/src/main/kotlin/jetbrains/kotlin/course/alias/util/Converters.kt +++ /dev/null @@ -1,6 +0,0 @@ -package jetbrains.kotlin.course.alias.util - -import jetbrains.kotlin.course.alias.team.JsTeam -import jetbrains.kotlin.course.alias.team.Team - -fun Team.toJsTeam(): JsTeam = TODO("Not implemented yet") diff --git a/aliasServer/aliasServerTeamService/src/main/kotlin/jetbrains/kotlin/course/alias/card/JsCard.kt b/aliasServer/aliasServerTeamService/src/main/kotlin/jetbrains/kotlin/course/alias/card/JsCard.kt index 12ae6e13..cb691eba 100644 --- a/aliasServer/aliasServerTeamService/src/main/kotlin/jetbrains/kotlin/course/alias/card/JsCard.kt +++ b/aliasServer/aliasServerTeamService/src/main/kotlin/jetbrains/kotlin/course/alias/card/JsCard.kt @@ -3,22 +3,4 @@ package jetbrains.kotlin.course.alias.card data class JsCard( val id: Int, val words: Array -) { - override fun equals(other: Any?): Boolean { - if (this === other) return true - if (javaClass != other?.javaClass) return false - - other as JsCard - - if (id != other.id) return false - if (!words.contentEquals(other.words)) return false - - return true - } - - override fun hashCode(): Int { - var result = id - result = 31 * result + words.contentHashCode() - return result - } -} +) diff --git a/aliasServer/aliasServerTeamService/src/main/kotlin/jetbrains/kotlin/course/alias/util/Converters.kt b/aliasServer/aliasServerTeamService/src/main/kotlin/jetbrains/kotlin/course/alias/util/Converters.kt deleted file mode 100644 index 815a21aa..00000000 --- a/aliasServer/aliasServerTeamService/src/main/kotlin/jetbrains/kotlin/course/alias/util/Converters.kt +++ /dev/null @@ -1,6 +0,0 @@ -package jetbrains.kotlin.course.alias.util - -import jetbrains.kotlin.course.alias.team.JsTeam -import jetbrains.kotlin.course.alias.team.Team - -fun Team.toJsTeam(): JsTeam = JsTeam(this.id, this.points, this.name) diff --git a/aliasServer/aliasServerTeams/src/main/kotlin/jetbrains/kotlin/course/alias/card/JsCard.kt b/aliasServer/aliasServerTeams/src/main/kotlin/jetbrains/kotlin/course/alias/card/JsCard.kt index 12ae6e13..cb691eba 100644 --- a/aliasServer/aliasServerTeams/src/main/kotlin/jetbrains/kotlin/course/alias/card/JsCard.kt +++ b/aliasServer/aliasServerTeams/src/main/kotlin/jetbrains/kotlin/course/alias/card/JsCard.kt @@ -3,22 +3,4 @@ package jetbrains.kotlin.course.alias.card data class JsCard( val id: Int, val words: Array -) { - override fun equals(other: Any?): Boolean { - if (this === other) return true - if (javaClass != other?.javaClass) return false - - other as JsCard - - if (id != other.id) return false - if (!words.contentEquals(other.words)) return false - - return true - } - - override fun hashCode(): Int { - var result = id - result = 31 * result + words.contentHashCode() - return result - } -} +) diff --git a/aliasServer/aliasServerTeams/src/main/kotlin/jetbrains/kotlin/course/alias/util/Converters.kt b/aliasServer/aliasServerTeams/src/main/kotlin/jetbrains/kotlin/course/alias/util/Converters.kt deleted file mode 100644 index 815a21aa..00000000 --- a/aliasServer/aliasServerTeams/src/main/kotlin/jetbrains/kotlin/course/alias/util/Converters.kt +++ /dev/null @@ -1,6 +0,0 @@ -package jetbrains.kotlin.course.alias.util - -import jetbrains.kotlin.course.alias.team.JsTeam -import jetbrains.kotlin.course.alias.team.Team - -fun Team.toJsTeam(): JsTeam = JsTeam(this.id, this.points, this.name) diff --git a/aliasServer/aliasServerUtil/src/main/kotlin/jetbrains/kotlin/course/alias/card/JsCard.kt b/aliasServer/aliasServerUtil/src/main/kotlin/jetbrains/kotlin/course/alias/card/JsCard.kt index 12ae6e13..cb691eba 100644 --- a/aliasServer/aliasServerUtil/src/main/kotlin/jetbrains/kotlin/course/alias/card/JsCard.kt +++ b/aliasServer/aliasServerUtil/src/main/kotlin/jetbrains/kotlin/course/alias/card/JsCard.kt @@ -3,22 +3,4 @@ package jetbrains.kotlin.course.alias.card data class JsCard( val id: Int, val words: Array -) { - override fun equals(other: Any?): Boolean { - if (this === other) return true - if (javaClass != other?.javaClass) return false - - other as JsCard - - if (id != other.id) return false - if (!words.contentEquals(other.words)) return false - - return true - } - - override fun hashCode(): Int { - var result = id - result = 31 * result + words.contentHashCode() - return result - } -} +) diff --git a/aliasServer/aliasServerUtil/src/main/kotlin/jetbrains/kotlin/course/alias/util/Converters.kt b/aliasServer/aliasServerUtil/src/main/kotlin/jetbrains/kotlin/course/alias/util/Converters.kt deleted file mode 100644 index 86be9709..00000000 --- a/aliasServer/aliasServerUtil/src/main/kotlin/jetbrains/kotlin/course/alias/util/Converters.kt +++ /dev/null @@ -1,6 +0,0 @@ -package jetbrains.kotlin.course.alias.util - -import jetbrains.kotlin.course.alias.team.JsTeam -import jetbrains.kotlin.course.alias.team.Team - -fun Team.toJsTeam(): JsTeam = TODO("Not implemented yet") diff --git a/wordsGeneratorServer/wordsGeneratorServerFinishGame/src/main/kotlin/jetbrains/kotlin/course/words/generator/util/Converters.kt b/wordsGeneratorServer/wordsGeneratorServerFinishGame/src/main/kotlin/jetbrains/kotlin/course/words/generator/util/Converters.kt deleted file mode 100644 index 99d54626..00000000 --- a/wordsGeneratorServer/wordsGeneratorServerFinishGame/src/main/kotlin/jetbrains/kotlin/course/words/generator/util/Converters.kt +++ /dev/null @@ -1,17 +0,0 @@ -package jetbrains.kotlin.course.words.generator.util - -import jetbrains.kotlin.course.words.generator.team.JsTeam -import jetbrains.kotlin.course.words.generator.results.GameJsResult -import jetbrains.kotlin.course.words.generator.results.GameResult -import jetbrains.kotlin.course.words.generator.team.Team -import jetbrains.kotlin.course.words.generator.team.TeamService - -fun List.toArrayJsTeams() = this.map { it.toJsTeam() }.toTypedArray() - -fun Team.toJsTeam(): JsTeam = JsTeam(this.id, this.points, this.name) - -fun GameJsResult.toGameResult(): GameResult = this.map { - val team = TeamService.teamsStorage[it.id] ?: error("Internal error! Unknown team with id: ${it.id} was received!") - team.points = it.points - team -} diff --git a/wordsGeneratorServer/wordsGeneratorServerHowToRun/src/main/kotlin/jetbrains/kotlin/course/words/generator/util/Converters.kt b/wordsGeneratorServer/wordsGeneratorServerHowToRun/src/main/kotlin/jetbrains/kotlin/course/words/generator/util/Converters.kt deleted file mode 100644 index 095dab96..00000000 --- a/wordsGeneratorServer/wordsGeneratorServerHowToRun/src/main/kotlin/jetbrains/kotlin/course/words/generator/util/Converters.kt +++ /dev/null @@ -1 +0,0 @@ -package jetbrains.kotlin.course.words.generator.util diff --git a/wordsGeneratorServer/wordsGeneratorServerIntroduction/src/main/kotlin/jetbrains/kotlin/course/words/generator/util/Converters.kt b/wordsGeneratorServer/wordsGeneratorServerIntroduction/src/main/kotlin/jetbrains/kotlin/course/words/generator/util/Converters.kt deleted file mode 100644 index 095dab96..00000000 --- a/wordsGeneratorServer/wordsGeneratorServerIntroduction/src/main/kotlin/jetbrains/kotlin/course/words/generator/util/Converters.kt +++ /dev/null @@ -1 +0,0 @@ -package jetbrains.kotlin.course.words.generator.util diff --git a/wordsGeneratorServer/wordsGeneratorServerTeamService/src/main/kotlin/jetbrains/kotlin/course/words/generator/team/TeamResource.kt b/wordsGeneratorServer/wordsGeneratorServerTeamService/src/main/kotlin/jetbrains/kotlin/course/words/generator/team/TeamResource.kt index e2f4e056..adc2d946 100644 --- a/wordsGeneratorServer/wordsGeneratorServerTeamService/src/main/kotlin/jetbrains/kotlin/course/words/generator/team/TeamResource.kt +++ b/wordsGeneratorServer/wordsGeneratorServerTeamService/src/main/kotlin/jetbrains/kotlin/course/words/generator/team/TeamResource.kt @@ -1,6 +1,5 @@ package jetbrains.kotlin.course.words.generator.team -import jetbrains.kotlin.course.words.generator.team.JsTeam import org.springframework.web.bind.annotation.* @RestController diff --git a/wordsGeneratorServer/wordsGeneratorServerTeamService/src/main/kotlin/jetbrains/kotlin/course/words/generator/util/Converters.kt b/wordsGeneratorServer/wordsGeneratorServerTeamService/src/main/kotlin/jetbrains/kotlin/course/words/generator/util/Converters.kt deleted file mode 100644 index 3ea86321..00000000 --- a/wordsGeneratorServer/wordsGeneratorServerTeamService/src/main/kotlin/jetbrains/kotlin/course/words/generator/util/Converters.kt +++ /dev/null @@ -1,6 +0,0 @@ -package jetbrains.kotlin.course.words.generator.util - -import jetbrains.kotlin.course.words.generator.team.JsTeam -import jetbrains.kotlin.course.words.generator.team.Team - -fun Team.toJsTeam(): JsTeam = JsTeam(this.id, this.points, this.name) diff --git a/wordsGeneratorServer/wordsGeneratorServerTeams/src/main/kotlin/jetbrains/kotlin/course/words/generator/util/Converters.kt b/wordsGeneratorServer/wordsGeneratorServerTeams/src/main/kotlin/jetbrains/kotlin/course/words/generator/util/Converters.kt deleted file mode 100644 index 3ea86321..00000000 --- a/wordsGeneratorServer/wordsGeneratorServerTeams/src/main/kotlin/jetbrains/kotlin/course/words/generator/util/Converters.kt +++ /dev/null @@ -1,6 +0,0 @@ -package jetbrains.kotlin.course.words.generator.util - -import jetbrains.kotlin.course.words.generator.team.JsTeam -import jetbrains.kotlin.course.words.generator.team.Team - -fun Team.toJsTeam(): JsTeam = JsTeam(this.id, this.points, this.name) diff --git a/wordsGeneratorServer/wordsGeneratorServerWord/src/main/kotlin/jetbrains/kotlin/course/words/generator/util/Converters.kt b/wordsGeneratorServer/wordsGeneratorServerWord/src/main/kotlin/jetbrains/kotlin/course/words/generator/util/Converters.kt deleted file mode 100644 index 3ea86321..00000000 --- a/wordsGeneratorServer/wordsGeneratorServerWord/src/main/kotlin/jetbrains/kotlin/course/words/generator/util/Converters.kt +++ /dev/null @@ -1,6 +0,0 @@ -package jetbrains.kotlin.course.words.generator.util - -import jetbrains.kotlin.course.words.generator.team.JsTeam -import jetbrains.kotlin.course.words.generator.team.Team - -fun Team.toJsTeam(): JsTeam = JsTeam(this.id, this.points, this.name) diff --git a/wordsGeneratorServer/wordsGeneratorServerWordService/src/main/kotlin/jetbrains/kotlin/course/words/generator/util/Converters.kt b/wordsGeneratorServer/wordsGeneratorServerWordService/src/main/kotlin/jetbrains/kotlin/course/words/generator/util/Converters.kt deleted file mode 100644 index e6380904..00000000 --- a/wordsGeneratorServer/wordsGeneratorServerWordService/src/main/kotlin/jetbrains/kotlin/course/words/generator/util/Converters.kt +++ /dev/null @@ -1,8 +0,0 @@ -package jetbrains.kotlin.course.words.generator.util - -import jetbrains.kotlin.course.words.generator.team.JsTeam -import jetbrains.kotlin.course.words.generator.team.Team - -fun List.toArrayJsTeams() = this.map { it.toJsTeam() }.toTypedArray() - -fun Team.toJsTeam(): JsTeam = JsTeam(this.id, this.points, this.name)