public int evaluatePiecePositions() {
    int score = 0;

    for ( int rank = 0; rank < 8; rank++ ) {
      for ( int file = rank * 16 + 7; file >= rank * 16; file-- ) {
        if ( !squareEmpty( file ) && pieceColourAt( file ) == this.turnColour ) {
          if ( isWhiteTurn() ) {
            score += piecePositionScore( pieceTypeAt( file ), file );
          } else {
            score -= piecePositionScore( pieceTypeAt( file ), file );
          }
        }
      }
    }

    return isWhiteTurn() ? score : -score;
  }