generated from admin/template
Практическая1
This commit is contained in:
@@ -0,0 +1,65 @@
|
||||
//TIP To <b>Run</b> code, press <shortcut actionId="Run"/> or
|
||||
// click the <icon src="AllIcons.Actions.Execute"/> icon in the gutter.
|
||||
fun main() {
|
||||
val name = "Kotlin"
|
||||
//TIP Press <shortcut actionId="ShowIntentionActions"/> with your caret at the highlighted text
|
||||
// to see how IntelliJ IDEA suggests fixing it.
|
||||
print("Введите тип карты: ")
|
||||
val cardType = readln()
|
||||
print("Введите подтип карты: ")
|
||||
val cardSubtype = readln()
|
||||
print("Введите название карты: ")
|
||||
val cardName = readln()
|
||||
|
||||
print("Введите описание эффекта: ")
|
||||
val effectText = readln()
|
||||
|
||||
print("Введите правило подтипа: ")
|
||||
val ruleText = readln()
|
||||
|
||||
print("Введите имя художника: ")
|
||||
val illustrator = readln()
|
||||
|
||||
|
||||
val healAmount = 60
|
||||
val cardNumber = 105
|
||||
val totalInSet = 106
|
||||
|
||||
|
||||
val separator = "======================================================================"
|
||||
val thinSeparator = "----------------------------------------------------------------------"
|
||||
|
||||
println(separator)
|
||||
|
||||
|
||||
val titleLeft = "[${cardType}] ${cardName}"
|
||||
println("${titleLeft.padEnd(60)}[${cardSubtype}]")
|
||||
|
||||
println(thinSeparator)
|
||||
|
||||
|
||||
val effectFormatted = effectText.replace("60 пунктов", "$healAmount пунктов")
|
||||
.replace("пунктов урона", "пунктов\n урона")
|
||||
println("Эффект: $effectFormatted")
|
||||
println()
|
||||
|
||||
|
||||
val ruleFormatted = ruleText.replace("использовать ", "использовать\n ")
|
||||
println("Правило: $ruleFormatted")
|
||||
|
||||
println(thinSeparator)
|
||||
|
||||
|
||||
val bottomLeft = "Илл. $illustrator"
|
||||
val bottomRight = "$cardNumber/$totalInSet ★"
|
||||
println("${bottomLeft.padEnd(61)}$bottomRight")
|
||||
|
||||
println(separator)
|
||||
}
|
||||
|
||||
for (i in 1..5) {
|
||||
//TIP Press <shortcut actionId="Debug"/> to start debugging your code. We have set one <icon src="AllIcons.Debugger.Db_set_breakpoint"/> breakpoint
|
||||
// for you, but you can always add more by pressing <shortcut actionId="ToggleLineBreakpoint"/>.
|
||||
println("i = $i")
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user