Documentation
Ruby
Ruby
Overview
The version of Ruby supported is Ruby 2.7.0
Each turn your source code will be compiled within a new sandbox, by default no information is shared or persisted between turns, if you wish to persist data then you should use the User Data field within the API.
Input - Standard Input (STDIN)
Within Ruby you can use $stdin.read
to capture the STDIN input
inp = $stdin.read
Ouput - Standard Outout (STDOUT)
Within Ruby you can simply use puts
to return your CSV based instructions to BotWars.
puts output
Example Bot
#!/usr/bin/ruby inputMap = $stdin.read # Bot logic... puts outputCommands