Sample Bot addition

Myself and a couple of friends would like to take part in the challenge, but predominantly use Scala for writing code. Could we get a Scala sample bot added to the challenge perhaps?

New sample bots are submitted by the community. Follow the guidelines for submitting a smaple bot and if/when accepted your team and anyone else can start using it.

Oooooh, awesome, i’ll do that then, thank you :smiley:

Hi guys,

Thanks @cairnswm you are quite correct, @niekz please feel free to ask if you have any specific questions on making the pull request and whatnot, we’re looking forward to seeing your Scala sample bot.

There is one thing I’d like to know, and it’s the process for running and testing your bot before submitting the pull request, as I couldn’t find a document showing how to package a new jar for the botrunner. Any help in that regard would be much appreciated.

Hi @niekz

What IDE are you using for Java?

@GeelKanarie I’m using Intellij IDEA

Last year when I did a Scala sample bot, I tested it as a Java bot . I did the same thing this year with my sample Kotlin bot. Have a look at the Maven files for the Java and Kotlin bots on how to package it. Java, Kotlin and Scala all needs to be compiled as “fat jars” in the end and then look pretty much the same from the outside.

Here is last years Scala bot, for the Scala specific bits, for details on the Maven file needed to generate a fat jar: https://github.com/EntelectChallenge/2017-Battleships/tree/master/Sample%20Bots/Scala/SampleBot

Sorry, I must have not been completely clear. I’m fine with packing my bot as a fat jar, I use sbt instead of maven. What i’m having issues with is compiling the game-engine so be able to put up my own bot against others (so as to test it)

You are going to have to change to Maven for the pull request, as far as I know. (I personally also prefer SBT, but I can understand that they do not want to support too many build tools, and Maven also works fine for this case.)

In terms of testing your bot, just “claim” it is is a Java bot for the testing with the game engine. You can use the starter pack. No need to rebuild the engine.

So far they seem fine with me using sbt, the pull request is awaiting review from one person before adding it to the base pack. In the meantime I suppose I can just change the language to “java” in the bot.json, which would make it run using my jar.

Thanks for the help thus far, seems like a nice enough community here at entelect :slight_smile: