title: How are a java Runnable object's other methods called?
body: <p>I am given some skeletons of classes that I must implement (I personally don't really agree with the design of the program but I am not at mercy to change it :( ) and they work in this manner:</p>
  
  <p>I have a <code>Game</code> class which implements <code>Runnable</code> and represents a chess game. </p>
  
  <p>A <code>Server</code> class will have a list of multiple <code>Game</code> classes that it keeps track of. </p>
  
  <p>Ok this makes sense, <code>Game</code> implements Runnable so the <code>Server</code> can put each game in its own thread.</p>
  
  <p>I am a bit confused at how java's threads work.</p>
  
  <p>What I know is the following:</p>
  
  <p>After tying my <code>Runnable</code> class to a thread and calling the <code>.start()</code> method, the <code>Runnable</code> class's <code>run()</code> method is called.</p>
  
  <p>However, I have some other methods inside my <code>Game</code> class such as:</p>
  
  <pre><code>capturePiece()
  
  playerMakesMove()
  </code></pre>
  
  <p>etc</p>
  
  <p>In the current design, it is up to the <code>Server</code> to handle game actions. When a player wants to capture a piece, the <code>Server</code> will call <code>game.capturePiece()</code>.</p>
  
  <p>In this case, is <code>capturePiece()</code> being run on the <code>Game</code> thread, or the <code>Server</code>'s thread? (the caller's thread or the callee's thread)</p>
  
  <p>In this case, what would <code>run()</code> even do? </p>