Skip to content

JANECEA/RobotFight

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

172 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Robot Fight

Robot Fight is a terminal-based C++23 programming game where two robots battle inside a tile-based arena. Each robot is controlled by a user-supplied C++ function that returns the next action every tick.

user-interface

Linux is the primary target and supports dynamic compilation of robot source files. Windows builds run with a bundled demo robot (no dynamic compilation).

Build

Release

cmake --preset release
cmake --build --preset release

Debug

cmake --preset debug
cmake --build --preset debug

Linux: requires g++ for dynamic compilation of robots.
Windows: run the commands from a Visual Studio Developer Command Prompt.

Run

Linux

./robot_fight <arena.txt> <red-robot.cpp> <blue-robot.cpp>

Windows

./robot_fight <arena.txt>

Example arenas and robots are in examples/arenas/ and examples/robots/.

Documentation

  • Project architecture: docs/Overview.md
  • Gameplay, configuration, and robot API: docs/UserGuide.md
  • API reference documentation: run Doxygen with doxygen docs/Doxyfile