chg: usr: make the first working version - the stepping is broken due to the algorythm structure #4
This commit is contained in:
@@ -1,14 +0,0 @@
|
||||
/*
|
||||
* Welcome to your app's main JavaScript file!
|
||||
*
|
||||
* We recommend including the built version of this JavaScript file
|
||||
* (and its CSS file) in your base layout (base.html.twig).
|
||||
*/
|
||||
|
||||
// any CSS you require will output into a single css file (app.css in this case)
|
||||
require('../css/app.css');
|
||||
|
||||
// Need jQuery? Install it with "yarn add jquery", then uncomment to require it.
|
||||
// const $ = require('jquery');
|
||||
|
||||
console.log('Hello Webpack Encore! Edit me in assets/js/app.js');
|
||||
@@ -1,10 +1,12 @@
|
||||
import React from 'react';
|
||||
import ReactDOM from 'react-dom';
|
||||
import MineSeeker from './mine-seeker/app';
|
||||
import React from "react";
|
||||
import ReactDOM from "react-dom";
|
||||
import MineSeeker from "./mine-seeker/app";
|
||||
|
||||
ReactDOM.render(
|
||||
<MineSeeker env={document.getElementById('mine-wrapper').dataset.env}
|
||||
gameId={document.getElementById('mine-wrapper').dataset.gameId}
|
||||
ssl={document.getElementById('mine-wrapper').dataset.ssl}/>,
|
||||
document.getElementById('mine-wrapper')
|
||||
<MineSeeker
|
||||
env={document.getElementById("mine-wrapper").dataset.env}
|
||||
gameId={document.getElementById("mine-wrapper").dataset.gameId}
|
||||
ssl={document.getElementById("mine-wrapper").dataset.ssl}
|
||||
/>,
|
||||
document.getElementById("mine-wrapper"),
|
||||
);
|
||||
|
||||
@@ -391,7 +391,7 @@ class MineSeeker extends React.Component {
|
||||
this.state.env === 'dev' && console.error("Disconnected for " + error.reason + " with code " + error.code);
|
||||
|
||||
error.code === 6 && this.setState({connectionLost: true});
|
||||
error.code === 3 && setTimeout(this.componentDidMount().bind(this), 500);
|
||||
error.code === 3 && setTimeout(this.componentDidMount.bind(this), 500);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -398,10 +398,6 @@ class GridControl extends React.Component {
|
||||
}
|
||||
}
|
||||
|
||||
overlayClass() {
|
||||
return 'game-overlay' + (this.state.overlay ? '' : ' hide');
|
||||
}
|
||||
|
||||
renderGridFields() {
|
||||
for (let i = 0, j = this.state.grid.length; i < j; i++) {
|
||||
for (let k = 0, l = this.state.grid[i].length; k < l; k++) {
|
||||
@@ -409,7 +405,7 @@ class GridControl extends React.Component {
|
||||
<GridField row={i}
|
||||
col={k}
|
||||
ref={this.refString(i, k)}
|
||||
key={window.btoa((Math.random() * 0.5).toString())}
|
||||
key={this.refString(i, k)}
|
||||
handleHoverOn={this.onHoverGridField.bind(this, [i, k])}
|
||||
onClick={this.props.onClick.bind(null, [i, k])}/>
|
||||
);
|
||||
@@ -424,7 +420,7 @@ class GridControl extends React.Component {
|
||||
|
||||
return (
|
||||
<div className="game-wrapper">
|
||||
<div className={this.overlayClass()}>
|
||||
<div className={`game-overlay ${this.state.overlay ? '' : ' hide'}`}>
|
||||
<div className="game-overlay-window">
|
||||
<h1>{this.state.overlayTitle}</h1>
|
||||
<h2>{this.state.overlaySubTitle}</h2>
|
||||
|
||||
42
assets/js/src/build/react-dom-server.js
vendored
42
assets/js/src/build/react-dom-server.js
vendored
@@ -1,42 +0,0 @@
|
||||
/**
|
||||
* ReactDOMServer v15.3.2
|
||||
*
|
||||
* Copyright 2013-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
*
|
||||
*/
|
||||
// Based off https://github.com/ForbesLindesay/umd/blob/master/template.js
|
||||
;(function(f) {
|
||||
// CommonJS
|
||||
if (typeof exports === "object" && typeof module !== "undefined") {
|
||||
module.exports = f(require('react'));
|
||||
|
||||
// RequireJS
|
||||
} else if (typeof define === "function" && define.amd) {
|
||||
define(['react'], f);
|
||||
|
||||
// <script>
|
||||
} else {
|
||||
var g;
|
||||
if (typeof window !== "undefined") {
|
||||
g = window;
|
||||
} else if (typeof global !== "undefined") {
|
||||
g = global;
|
||||
} else if (typeof self !== "undefined") {
|
||||
g = self;
|
||||
} else {
|
||||
// works providing we're not in "use strict";
|
||||
// needed for Java 8 Nashorn
|
||||
// see https://github.com/facebook/react/issues/3037
|
||||
g = this;
|
||||
}
|
||||
g.ReactDOMServer = f(g.React);
|
||||
}
|
||||
|
||||
})(function(React) {
|
||||
return React.__SECRET_DOM_SERVER_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
||||
});
|
||||
12
assets/js/src/build/react-dom-server.min.js
vendored
12
assets/js/src/build/react-dom-server.min.js
vendored
@@ -1,12 +0,0 @@
|
||||
/**
|
||||
* ReactDOMServer v15.3.2
|
||||
*
|
||||
* Copyright 2013-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
*
|
||||
*/
|
||||
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e(require("react"));else if("function"==typeof define&&define.amd)define(["react"],e);else{var f;f="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,f.ReactDOMServer=e(f.React)}}(function(e){return e.__SECRET_DOM_SERVER_DO_NOT_USE_OR_YOU_WILL_BE_FIRED});
|
||||
42
assets/js/src/build/react-dom.js
vendored
42
assets/js/src/build/react-dom.js
vendored
@@ -1,42 +0,0 @@
|
||||
/**
|
||||
* ReactDOM v15.3.2
|
||||
*
|
||||
* Copyright 2013-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
*
|
||||
*/
|
||||
// Based off https://github.com/ForbesLindesay/umd/blob/master/template.js
|
||||
;(function(f) {
|
||||
// CommonJS
|
||||
if (typeof exports === "object" && typeof module !== "undefined") {
|
||||
module.exports = f(require('react'));
|
||||
|
||||
// RequireJS
|
||||
} else if (typeof define === "function" && define.amd) {
|
||||
define(['react'], f);
|
||||
|
||||
// <script>
|
||||
} else {
|
||||
var g;
|
||||
if (typeof window !== "undefined") {
|
||||
g = window;
|
||||
} else if (typeof global !== "undefined") {
|
||||
g = global;
|
||||
} else if (typeof self !== "undefined") {
|
||||
g = self;
|
||||
} else {
|
||||
// works providing we're not in "use strict";
|
||||
// needed for Java 8 Nashorn
|
||||
// see https://github.com/facebook/react/issues/3037
|
||||
g = this;
|
||||
}
|
||||
g.ReactDOM = f(g.React);
|
||||
}
|
||||
|
||||
})(function(React) {
|
||||
return React.__SECRET_DOM_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
||||
});
|
||||
12
assets/js/src/build/react-dom.min.js
vendored
12
assets/js/src/build/react-dom.min.js
vendored
@@ -1,12 +0,0 @@
|
||||
/**
|
||||
* ReactDOM v15.3.2
|
||||
*
|
||||
* Copyright 2013-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
*
|
||||
*/
|
||||
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e(require("react"));else if("function"==typeof define&&define.amd)define(["react"],e);else{var f;f="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,f.ReactDOM=e(f.React)}}(function(e){return e.__SECRET_DOM_DO_NOT_USE_OR_YOU_WILL_BE_FIRED});
|
||||
22926
assets/js/src/build/react-with-addons.js
vendored
22926
assets/js/src/build/react-with-addons.js
vendored
File diff suppressed because it is too large
Load Diff
16
assets/js/src/build/react-with-addons.min.js
vendored
16
assets/js/src/build/react-with-addons.min.js
vendored
File diff suppressed because one or more lines are too long
20595
assets/js/src/build/react.js
vendored
20595
assets/js/src/build/react.js
vendored
File diff suppressed because it is too large
Load Diff
16
assets/js/src/build/react.min.js
vendored
16
assets/js/src/build/react.min.js
vendored
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user