MCPcopy Create free account
hub / github.com/tensorflow/tfjs-examples / generateOnePlay

Function generateOnePlay

data-generator/game.js:141–147  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

139 * Returns [hand1, hand2, whetherHand1Wins.
140 */
141export function generateOnePlay() {
142 const player1Hand = randomHand();
143 const player2Hand = randomHand();
144 const player1Win = compareHands(player1Hand, player2Hand);
145 GAME_STATE.num_simulations_so_far++;
146 return {player1Hand, player2Hand, player1Win};
147}

Callers

nothing calls this directly

Calls 2

randomHandFunction · 0.85
compareHandsFunction · 0.85

Tested by

no test coverage detected