Giter Club home page Giter Club logo

battlesnake-kt's Introduction

Battlesnake Starter for Kotlin

This is a simple starter project containing the bare-bone Battlesnake API implementation. This starter is a great way to get started writing a Battlesnake in Kotlin! This starter makes use of Ktor, a Kotlin Web library designed for making APIs and websites, to name a few applications.

To start, it is recommended that you first read the Quick Start guide in the Battlesnake docs. Then, you can open up Battlesnake.kt, and change some values that are marked with comments. Lastly, you can write your movement logic in Logic.kt. Good luck with writing your first Battlesnake!

Customizing your snake

You can customize your snake in customizations.json. For example, if I wanted the iguana head and tail, and I would want a red snake, my customizations.json would look like this:

{
    "color": "#FF0000",
    "head": "iguana",
    "tail": "iguana"
}

These changes will not take effect immediately, you have to click the "Reload" button next to your Battlesnake, inside the Battlesnake list.

Changing logic

You can look inside the Logic.kt file, on how to get started adding logic to your snake!

Running your snake

For convenience, this project uses the gradle application plugin to run your snake, to get started for testing. Simply run ./gradlew run to run your snake. IntelliJ Idea will also automatically generate run configurations, so you can use that as well.

Eventually you might want to deploy to a server. You can use ./gradlew build to create a "fat jar", then run the artifact using java -jar build\libs\YourNameHere-1.0.jar Alternatively, you can use the convenient distributions inside of build/distributions.

battlesnake-kt's People

Contributors

lilygomes avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.