<commit_before><link rel="import" href="../../bower_components/polymer/polymer.html">

<dom-module id="boardgame-tictactoe-cell">
  <template>
    <style>
      div {
        height:3em;
        width:3em;
        cursor:pointer;
      }
    </style>
    <div on-tap="handleTap">
      {{value}}
    </div>
  </template>

  <script>
    Polymer({
      is: 'boardgame-tictactoe-cell',
      properties: {
        token: {
          type: Object,
          observer: "_tokenChanged",
        },
        index: Number,
        value: String,
      },

      _tokenChanged: function(newValue) {
        if (!newValue) {
          this.value = "";
          return
        }
        console.log(newValue);
        this.value = newValue.Values.Value;
      },

      handleTap: function() {
        this.fire("propose-move", {name: "Place Token", arguments: {
          "Slot": this.index,
        }});
      }


    });
  </script>
</dom-module><commit_msg>Centered tokens. part of #337.<commit_after><link rel="import" href="../../bower_components/polymer/polymer.html">
<link rel="import" href="../../bower_components/iron-flex-layout/iron-flex-layout-classes.html">

<dom-module id="boardgame-tictactoe-cell">
  <template>
    <style include="iron-flex">
      :host {
        height:6em;
        width:6em;
        cursor:pointer;
      }
      .cell {
        height: 100%;
        width: 100%;
      }
      .cell>div {
        text-align:center;
      }
    </style>
    <div class="cell layout vertical center center-justified" on-tap="handleTap">
      {{value}}
    </div>
  </template>

  <script>
    Polymer({
      is: 'boardgame-tictactoe-cell',
      properties: {
        token: {
          type: Object,
          observer: "_tokenChanged",
        },
        index: Number,
        value: String,
      },

      _tokenChanged: function(newValue) {
        if (!newValue) {
          this.value = "";
          return
        }
        this.value = newValue.Values.Value;
      },

      handleTap: function() {
        this.fire("propose-move", {name: "Place Token", arguments: {
          "Slot": this.index,
        }});
      }


    });
  </script>
</dom-module>
{'fraction_non_alphanumeric': 0.15765352887259396, 'fraction_numerical': 0.005957836846929423, 'mean_word_length': 1.7915601023017902, 'pattern_counts': {'":': 2, '<': 26, '<?xml version=': 0, '>': 27, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3019764', 'n_tokens_mistral': 703, 'n_tokens_neox': 678, 'n_words': 120}