First commit

This commit is contained in:
2025-07-25 10:17:27 +02:00
commit be2d24771e
11 changed files with 129 additions and 0 deletions

View File

@@ -0,0 +1,6 @@
██╗ ██╗███████╗██╗ ██╗ ██████╗ ██╗ ██╗ ██████╗ ██████╗ ██╗ ██████╗
██║ ██║██╔════╝██║ ██║ ██╔═══██╗ ██║ ██║██╔═══██╗██╔══██╗██║ ██╔══██╗
███████║█████╗ ██║ ██║ ██║ ██║ ██║ █╗ ██║██║ ██║██████╔╝██║ ██║ ██║
██╔══██║██╔══╝ ██║ ██║ ██║ ██║ ██║███╗██║██║ ██║██╔══██╗██║ ██║ ██║
██║ ██║███████╗███████╗███████╗╚██████╔╝ ╚███╔███╔╝╚██████╔╝██║ ██║███████╗██████╔╝
╚═╝ ╚═╝╚══════╝╚══════╝╚══════╝ ╚═════╝ ╚══╝╚══╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝

23
src/main/scala/Main.scala Normal file
View File

@@ -0,0 +1,23 @@
import fansi.Attr
import fansi.Color
import scala.io.Source
def colors: List[Attr] = List(
Color.Red,
Color.LightRed,
Color.Yellow,
Color.Green,
Color.Blue,
Color.Magenta
)
val message: String = Source.fromResource("hello.txt").mkString
@main def hello(): Unit = {
val splitMessage: Array[String] = message.split("\n")
for (i <- splitMessage.indices) {
val colorIndex = i % colors.length
val coloredLine = colors(colorIndex)(splitMessage(i))
println(coloredLine)
}
}

View File

@@ -0,0 +1,9 @@
// For more information on writing tests, see
// https://scalameta.org/munit/docs/getting-started.html
class MySuite extends munit.FunSuite {
test("example test that succeeds") {
val obtained = 42
val expected = 42
assertEquals(obtained, expected)
}
}