stickfosh/src/model/ais/v0_random.cpp
Karma Riuk 5cbe57dc55
Some checks failed
pre-release / Pre Release (push) Waiting to run
tagged-release / Tagged Release (push) Has been cancelled
Removed the python version and kept just the c++ one
2025-02-16 09:36:04 +01:00

14 lines
278 B
C++

#include "ai.hpp"
#include <thread>
Move ai::v0_random::_search(const Board& b) {
std::vector<Move> moves = b.all_legal_moves();
std::this_thread::sleep_for(std::chrono::milliseconds(thinking_time)
); // Simulate work
return moves[rand() % moves.size()];
}