Private
Public Access
1
0

add production mods

This commit is contained in:
2016-11-21 13:45:28 +01:00
parent 5a3ce73e40
commit ed40ad02da
9 changed files with 53 additions and 29 deletions

View File

@@ -10,6 +10,7 @@ class MineSeeker extends React.Component {
var channel = "mineseeker/channel/" + gameAssoc;
this.state = {
env: props.env,
gameInherited: props.gameId !== '',
gameAssoc: gameAssoc,
channel: channel,
@@ -51,8 +52,8 @@ class MineSeeker extends React.Component {
/** THE END */
makeGameEndIfItEnds(bluePoints, redPoints, resign = false) {
var redWins = redPoints > 2,
blueWins = bluePoints > 2;
var redWins = redPoints > 25,
blueWins = bluePoints > 25;
if (redWins || blueWins || resign) {
this.refs.gridControl.state.sound.won.play();
@@ -121,7 +122,11 @@ class MineSeeker extends React.Component {
/** after rendering */
componentDidMount() {
/** Create Websocket w/ Bahnhof.js */
var websocket = WS.connect("ws://mine.dev:6450");
var websocket = WS.connect(
this.state.env === 'dev'
? "ws://mine.dev:6450"
: "ws://www.mineseeker.ninja:6450"
);
/**
* Connect
@@ -250,7 +255,7 @@ class MineSeeker extends React.Component {
this.refs.gridControl.setState({
overlay: true,
overlayTitle: "The connection has been lost...",
overlayTitle: "The connection has been lost w/ your friend...",
overlaySubTitle: "Please, restart the game!"
});
}