Our own Core War AI champion, assembler, disassembler, and virtual machine in C using ncurses and minilibx. (42 Silicon Valley)
(This screenshot shows Player 2 (Chicken) is currently in the lead...)
- AI champion program, e.g.
srcs_champ/plagiarism.s
- Written in 42 corewar variant assembly instruction set
- Assembler
- Translate assembly
.s
to binary.cor
- Translate assembly
- Disassembler
- Reverse-engineer binary
.cor
to assembly.s
- Reverse-engineer binary
- Virtual Machine
- Enforce game rules
- Render game graphics
You are on macOS with gcc
and make
installed.
make
./asm [ champ1.s ... ]
./disasm [ champ1.cor ... ]
The game can start with 1 - 4 players
./corewar [flags] [ champ1.cor ... ]
Flags:
-v
Enable dual visualizers.-e
Enable emoji mode.
(Circular Visualizer window has focus)
Right Arrow
Step forward 1 cycle.Tab
Fast-forward and stop on next cycle-to-die.Spacebar
Fast-forward or stop.Up Arrow
Increase frame-skip.Down Arrow
Decrease frame-skip.Escape
Terminate the program.