Commit 7f7beea4 authored by Tobias Bengfort's avatar Tobias Bengfort
Browse files

mv clone to utils.js

parent 4c26def8
......@@ -2,6 +2,7 @@ import template from './template.js';
import scenarios from './scenarios.js';
import * as logic from './logic.js';
import * as constants from './constants.js';
import {clone} from './utils.js';
let state, tree;
......@@ -28,10 +29,6 @@ const on = function(eventType, selector, fn) {
});
};
const clone = function(obj) {
return JSON.parse(JSON.stringify(obj));
};
const play = function() {
if (!state.game.playing) {
return;
......
export const clone = function(obj) {
return JSON.parse(JSON.stringify(obj));
};
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment