Insert my IA

How insert your IA in binary ?

To insert your AI in your binary, there is 2 steps :

  • Makefile

  • Main

Makefile

This step is important if you want your AI compile with the binary.

To include your AI to the compile, you have to add 2 lines :

#
# To include your IA source :
# CPP : IA_CPP_SOURCES = <file>
#

IA_CPP_SOURCES += <PATH>/<CPP FILE>

Main

In main it's really simple, you just have to follow this code :

/*
** EPITECH PROJECT, 2022
** Gomoku
** File description:
** Main
*/

#include "Gomoku.hpp"
#include "MyAI/MyAI.hpp"

int main() {
    Gomoku::Game game;
    std::shared_ptr<Gomoku::MyAI> myAI= std::make_shared<Gomoku::MyAI>();

    game.setIA(myAI);
    game.start();
}

Now your AI is ready to use !

Last updated