Test-Driven Java Development(Second Edition)
上QQ阅读APP看书,第一时间看更新

Implementation

There's no real need to check whether it really is the player's first turn or not. As it stands, this test can be fulfilled by always returning X. Later tests will force us to refine this code:

public char nextPlayer() {
  return 'X';
}