title: Passing parameters to a trait
body: <p>I want to model the game of chess.
  For that, I want to make an abstract class, <code>Piece</code> which takes a player and a position as arguments. From that, I want to extend to other classes such as <code>Pawn</code>:</p>
  
  <pre><code>trait Piece(player: Int, pos: Pos) = {
  
    def spaces(destination: Pos): List[Pos]
  
  }
  
  case class Pawn extends Piece = {
  //some other code
  }
  </code></pre>
  
  <p>However, I think I'm not allowed to pass parameters to a trait, like this <code>trait Piece(player: Int, pos: Pos)</code>.</p>
  
  <p>So how can I have an abstract class <code>Piece</code> that has fields?</p>