From: Evgenii Akentev Date: Sun, 19 May 2019 00:17:43 +0000 (+0300) Subject: init varlamov X-Git-Url: https://git.xn--bdkaa.com/?a=commitdiff_plain;h=5fc43e80a536465a63a362197b617ac01c2a21a3;p=where-are-you.py.git init varlamov --- diff --git a/src/Game.js b/src/Game.js index 8e9b9bd..c4d46e2 100644 --- a/src/Game.js +++ b/src/Game.js @@ -2,6 +2,7 @@ import React, { Component } from 'react'; import { AppLayout } from './AppLayout'; import logo from './img/cat.png'; +import varlamov from './img/varlamov.png'; import { createMap } from './createMap'; import { GameController } from './GameController'; import { Notification } from './Notification'; @@ -11,6 +12,10 @@ export class Game extends Component { constructor(props) { super(props); this.notification = new Notification(); + this.handleVarlamov = function(tips) { + console.log(tips); + return tips; + } this.gameController = new GameController(this.notification); this.state = { tips: this.gameController.tips(), @@ -21,7 +26,7 @@ export class Game extends Component { componentDidMount() { this.gameController.createGame().then(() => this.gameController.loadTips()).then(() => { this.setState({ - tips: this.gameController.tips(), + tips: this.handleVarlamov(this.gameController.tips()), loading: false }, () => { createMap('map', this.onMapClick); @@ -37,7 +42,7 @@ export class Game extends Component { askTip = () => { this.gameController.getMoreTips().then(() => { this.setState({ - tips: this.gameController.tips() + tips: this.handleVarlamov(this.gameController.tips()) }) }).catch(error => { this.notification.show( @@ -50,7 +55,7 @@ export class Game extends Component { move = () => { this.gameController.goForward().then(() => { this.setState({ - tips: this.gameController.tips() + tips: this.handleVarlamov(this.gameController.tips()) }) }).catch(error => { this.notification.show( diff --git a/src/GameController.js b/src/GameController.js index b14f2ca..7ad696e 100644 --- a/src/GameController.js +++ b/src/GameController.js @@ -44,4 +44,4 @@ export class GameController { tryFinish(ltLng) { return api.post(`/games/${this.gameId}/finish/${ltLng}`); } -} \ No newline at end of file +} diff --git a/src/img/varlamov.png b/src/img/varlamov.png new file mode 100644 index 0000000..d56e70f Binary files /dev/null and b/src/img/varlamov.png differ