<commit_before>import React, { PropTypes } from 'react'
import GameTable from '../GameTable'
import PlayerUI from '../PlayerUI'

const App = () => {

    return (
        <div className="app">
          <h2>APP</h2>
          <GameTable />
          <PlayerUI />
        </div>
      )

}


export default App<commit_msg>Add shuffle function and card structure generator function<commit_after>import React, { PropTypes } from 'react'
import GameTable from '../GameTable'
import PlayerUI from '../PlayerUI'

let createCards = () => {
  cards = []
  const faces = ["A","2","3","4","5","6","7","8","9","10","J","Q","K"]
  const suits = ["Spade","Diamond","Club","Heart"]

  for (var i = 0; i < 4; i++) {
    for (var j = 0; j < 13; j++) {
      let item = { face: faces[j], suit: suits[i], value: getValue(faces[j]) }
      if( item.value == 255 ) item.isHighAce = true
      else item.isHighAce = null
      cards.push(item)
    }
  }

  let passByReference = {deck: cards}
  shuffle(passByReference)
}

let shuffle = (passByReference) => {
  passByReference.deck = passByReference.deck || []

  var j, x, i
  for (i = passByReference.deck.length; i; i--) {
    j = Math.floor(Math.random() * i)
    x = passByReference.deck[i - 1]
    passByReference.deck[i - 1] = passByReference.deck[j]
    passByReference.deck[j]= x
  }
}

let getValue = (face) => {
  if(face === "A") return 255
  else if(face === "J" || face === "Q" || face === "K") return 10
  else return parseInt(face)
}

const App = () => {

    return (
        <div className="app">
          <h2>APP</h2>
          <GameTable />
          <PlayerUI />
        </div>
      )

}


export default App
{'fraction_non_alphanumeric': 0.1806140878988561, 'fraction_numerical': 0.017459361830222758, 'mean_word_length': 2.6130434782608694, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 20, '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': '787162', 'n_tokens_mistral': 591, 'n_tokens_neox': 566, 'n_words': 145}