add production mods
This commit is contained in:
@@ -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!"
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user