Giter Site home page Giter Site logo

mm25-cpp-starter-pack's Introduction

MechMania25 C++ Starter Pack

Here's all the code you need to get started with making a bot for MechMania in C++. Just do these steps:

  • Pre-Setup -- install Java, Node, and the mm command line tools
  • Setup -- Clone this repository and start running your bot!

Pre-Setup

  1. Follow the Pre-setup instructions on the wiki here

  2. Install or update clang++ to compile your C++ code! You can check out this guide on getting started with clang

Setup

  1. Clone this repo (or fork it or download it somewhere as a ZIP)

  2. Modify the script at strategy.cpp.

    • Write your code in the Strategy::doTurn method.
    • You may also add other files or dependencies. If you have any questions about this, we're here to help!
  3. Run make server. This step should be completed whenever you want to run any mm commands with a new strategy.

    • If you encounter any linker errors that seem to do nothing with your files, this may be a result of some dependency errors.
      • Crow is the library used for the webserver, and has caused issues in the past. In particular, the boost C++ library.
      • If you are still having issues, consult Boost Installation
  4. Run mm play .

    • This will build the bot in the given directory (.) and then starts a game in which your bot fights against itself.
    • On Windows, if an mm play command fails, make sure to close any Java SE Runtime Binary processes with Task Manager.
    • run mm play with the --logfile [filename] option set from within Bash Subsystem for Windows to get a log for a game
      • then run mm play with the --input [filename] option set from the Windows command prompt to view the game
      • This also means you can't run mm play human from bash subsystem
  5. To run two different bots against each other, run mm play bot1_directory bot2_directory.

  6. To submit your bot, run mm push .

Use mm help for more information!

Game API Information

The header file (strategy.h) has a list of functions that you should implement, and a list of functions to get data from the game are in api.h.

Note: you should not need to edit the files inside of Resources.

Good luck, and happy coding!

Boost Installation FAQ

Mac

brew install boost

Linux and Windows Ubuntu Subsystem

apt-get install libboost-all-dev

mm25-cpp-starter-pack's People

Contributors

hoelzeljon avatar pranaygp avatar prithviramanathan avatar skagawa2 avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

victorfu14

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.