sw-battle-test-c

Interesting test task in C instead of C++
git clone git://bsandro.tech/sw-battle-test-c
Log | Files | Refs | README

command.h (276B)


      1 #pragma once
      2 
      3 #include <stdlib.h>
      4 #include <stdio.h>
      5 #include "core/world.h"
      6 
      7 #define MAX_CMD_NAME_LEN 64
      8 #define MAX_CMD_ARG_LEN 8
      9 
     10 typedef bool Command_Func(World *w, int argc, char **argv);
     11 
     12 typedef struct Command {
     13     const char *name;
     14     Command_Func *func;
     15 } Command;