42's version of the famous programming game.
Programs, known as champions, duke it out inside a virtual machine. (Usually known as MARS, we call it the VM.) The specifications of this 42 project require:
- An assembler, asm for short, which will compile champions (example), written in a variant of Redcode assembly, to bytecode,
- a virtual machine, our arena, wherein our champions (now in bytecode form) hack themselves to bits, and
- lastly, a champion of our own, to pit against others and win eternal glory.
git clone https://gitlab.com/jonasroussel/Corewar.git && cd Corewar && make && ./asm champs/our_champs/Forking.s champs/fluttershy.s -o output && ./corewar -v output/Forking.cor output/fluttershy.cor
This will clone the project, compile it, assemble our star champion, Forking, and a fellow warrior, before running Corewar in visual mode. Press space, sit back, and watch the bytes fly.