<!DOCTYPE html>

<html>
  <body>
    <element name="game-results-panel" extends="div" constructor="GameResultsPanel">
      <template>
        <h2>Results</h2>
        <div class="game-data">
          <div>Score: {{app.board.score}}</div>
          <div>
            <template if="app.board.words.keys.isEmpty">
              <p>You did not pick any words</p>
            </template>

            <template if="!app.board.words.keys.isEmpty">
              <h2>You found {{app.board.words.length}} words</h2>
                <ul>
                  <li template repeat='key in app.board.words.keys'>
                    {{key}} {{app.board.words[key]}}
                  </li>
                </ul>
            </template>
          </div>
          <button on-click="app.currentPanel='newGame'">Another game</button>
          <button on-click="app.currentPanel='highScores'; app.player.refreshHighScoreLeaderboard()">See scores</button>
          <button on-click="app.currentPanel='main'">Home</button>
        </div>
      </template>
      <script type="application/dart" src="game_results_panel.dart"></script>
    </element>
  </body>
</html>
<!DOCTYPE html>

<html>
  <body>
    <element name="game-results-panel" extends="div" constructor="GameResultsPanel">
      <template>
        <h2>Results</h2>
        <div class="game-data">
          <div>Score: {{app.board.score}}</div>
          <div>
            <template if="app.board.words.keys.isEmpty">
              <p>You did not pick any words</p>
            </template>

            <template if="!app.board.words.keys.isEmpty">
              <h2>You found {{app.board.words.length}} words</h2>
                <ul>
                  <li template repeat='key in app.board.words.keys'>
                    {{key}} {{app.board.words[key]}}
                  </li>
                </ul>
            </template>
          </div>
          <button on-click="app.newGame()">Another game</button>
          <button on-click="app.currentPanel='highScores'; app.player.refreshHighScoreLeaderboard()">See scores</button>
          <button on-click="app.currentPanel='main'">Home</button>
        </div>
      </template>
      <script type="application/dart" src="game_results_panel.dart"></script>
    </element>
  </body>
</html>
Fix Another Game button so a fresh game is started.
Fix Another Game button so a fresh game is started.
