JSFiddle - React, Tailwind, and code Playground

by Josh Pullen

JavaScript

import { Game, Player } from "http://localhost:3000/mazeGame.js";

// __reportValuesBeforeStatement(5, 5, { Game, Player, game });

__reportValuesAfterStatement(1, 1, r => {
  try { r("Game", Game) } catch(e) {}
  try { r("Player", Player) } catch(e) {}
  try { r("game", game) } catch(e) {}
});
__reportValuesBeforeStatement(5, 5, _reportValues);

const game = new Game();

__reportValuesAfterStatement(5, 5, _reportValues);

if (true) {
	const _reportValues = r => {
    try { r("Game", Game) } catch(e) {}
    try { r("Player", Player) } catch(e) {}
    try { r("game", game) } catch(e) {}
  };

  __reportValuesBeforeStatement(5, 5, _reportValues);

  const game = new Game();

  __reportValuesAfterStatement(5, 5, _reportValues);
}


function __reportValuesBeforeStatement(lineStart, lineEnd, callback) {
	let values = {};
  const report = (key, value) => {
    values[key] = value;
  }
  callback(report);
  console.log(values);
}