initial commit2

This commit is contained in:
2026-06-12 12:28:00 +03:00
parent 13447b858e
commit 59d33f8061
595 changed files with 11459 additions and 1 deletions
@@ -0,0 +1,16 @@
package commands
import models.HumanBeing
import runner.CommandInvoker
class HelpCommand(private val invoker: CommandInvoker) : ClientCommand {
override val name = "help"
override val description = "вывести справку по доступным командам"
override val args = listOf(CommandArgType.NONE)
override val type = CommandType.SIMPLE
override fun execute(args: List<String>, humanBeing: HumanBeing?): String =
invoker.getCommands().values
.sortedBy { it.name }
.joinToString("\n") { " ${it.name.padEnd(40)} — ${it.description}" }
}