title: Different implementations of a C header file
body: <p>How can I add multiple implementations to this header file:</p>
  
  <p>MoveAgent.h</p>
  
  <pre><code>#ifndef _GAMEAGENT_
  #define _GAMEAGENT_
  
  #include "Defs.h"
  #include "GameModel.h"
  
  MoveDirection takeDirection(GameState *gs);
  
  #endif _GAMEAGENT_
  </code></pre>
  
  <p>MoveAgent.c: Let's say that I have an implementation that will return a random move</p>
  
  <pre><code>MoveDirection takeDirection(GameState *gs) {    
      MoveDirection dir = DIR_NONE;       
      while (dir == DIR_NONE) {
          int index = arc4random() % gs-&gt;moves_total;     
          MoveDirection tempDir = gs-&gt;moves[index];       
          if (tempDir != oppDir(gs-&gt;car.direction)) {
              dir = tempDir;
          }
      }
      return dir;
  }
  </code></pre>
  
  <p>What is practical way of having multiple implementations of that function?</p>
  
  <p>As you might guess, I'm a Java programmer trying to make a basic game to learn C, so I'm trying to do this to simulate a Java interface.</p>
  
  <p>Any ideas?</p>