Skip to content

deosulav/Bhoos_Bot

Repository files navigation

Starter Code for Bhoos's Smart Bots 2023

Still wondering why the language that runs the world is missing from this grand competition?
Now's probably the right time to stop wondering, (>.<)

Installation

Requires a compatible c++ compiler. One that supports c++20 is a plus.

This code uses single header libraries HTTPServer and JSON parser (Credit to their writers for these high quality libraries).
They need to be downloaded from their respective github repository as explained below. They were removed from direction inclusion due to their quite large size.

If curl is installed, simply run

Windows

setup.bat

Linux

chmod +x ./setup.sh
setup.sh 

In case, curling isn't the way you want to do, simply download both headers :

https://github.com/yhirose/cpp-httplib/blob/master/httplib.h
https://github.com/nlohmann/json/blob/develop/single_include/nlohmann/json.hpp

and place both header files inside folder 'include' inside this directory

The structure of cpp folder will then be like this :

include\
src\
setup.bat
setup.sh
Readme.md 

Build Instructions

From inside this directory,
compile both files together and simply run the executable.

Windows

g++/clang++ ./src/main.cpp ./src/bot.cpp -ofast -std=c++17 -march=native -lws2_32 -o game
game.exe

Linux

g++/clang++ ./src/main.cpp ./src/bot.cpp -ofast -std=c++17 -march=native -pthread -o game
./game


Info : This isn't thorougly tested. Feel free to report issues, bugs or unintended behaviors. If you have trouble with docker submission or face performance regression, remove -march-native from the compiler flag inside dockerfile.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages