Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/levelz-file/kotlin-bindings
Kotlin Multiplatform Parser & API for LevelZ File Format
https://github.com/levelz-file/kotlin-bindings
kotlin kotlin-multiplatform levelz
Last synced: 3 months ago
JSON representation
Kotlin Multiplatform Parser & API for LevelZ File Format
- Host: GitHub
- URL: https://github.com/levelz-file/kotlin-bindings
- Owner: LevelZ-File
- License: mit
- Created: 2024-04-22T14:53:22.000Z (10 months ago)
- Default Branch: master
- Last Pushed: 2024-11-14T13:46:58.000Z (3 months ago)
- Last Synced: 2024-11-14T14:40:04.680Z (3 months ago)
- Topics: kotlin, kotlin-multiplatform, levelz
- Language: Kotlin
- Homepage: https://levelz-file.github.io/kotlin-bindings/
- Size: 676 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# levelz-kt
> Alternative Kotlin Bindings designed for Kotlin Multiplatform
[](https://jitpack.io/#LevelZ-File/kotlin-bindings)
## Why?
The official [java-bindings](https://github.com/LevelZ-File/java-bindings) are designed to be implemented on
the JVM. This project is designed to be implemented on Kotlin Multiplatform.**They are intended to be functionally the same, and to not be used together.**
### Download
```xml
calculus-releases
https://repo.calcugames.xyz/repository/maven-releases/
calculus-snapshots
https://repo.calcugames.xyz/repository/maven-snapshots/
xyz.calcugames
levelz-kt
[VERSION]
```
Gradle (Groovy)
```groovy
// Add Calculus Games Repositories
repositories {
maven { url 'https://repo.calcugames.xyz/repository/maven-releases/' }
maven { url 'https://repo.calcugames.xyz/repository/maven-snapshots/' }
}dependencies {
implementation 'xyz.calcugames:levelz-kt:[VERSION]'
}
```Gradle (Kotlin DSL)
```kts
// Add Calculus Games Repository
repositories {
maven("https://repo.calcugames.xyz/repository/maven-releases/")
maven("https://repo.calcugames.xyz/repository/maven-snapshots/")
}dependencies {
implementation("xyz.calcugames:levelz-kt:[VERSION]")
}
```## Usage
```kotlin
val (x, y) = Coordinate2D(1, 2)
val (x, y, z) = Coordinate3D(1, 2, 3)println(x) // 1
println(y) // 2
``````kotlin
val levelString = """
@type 2\n
@spawn [0, 1]\n
@scroll none\n
---
grass: [0, 0]*[0, 1]
"""val level = parseLevel(levelString) as Level2D
println(level.scroll) // Scroll.NONE
```