import { Button, Classes, Intent, NonIdealState } from '@blueprintjs/core';
import { List } from 'immutable';
import React, { Component } from 'react';
import { connect } from 'react-redux';
import type { ApiPlayerMove, ApiPlayerTurnInfo } from '../../api/model';
import { Game } from '../../models/games';
import { Player } from '../../models/players';
import { actions } from '../../redux/actions/game';
import { getCurrentTurnInfo } from '../../redux/currentGame';
import { getCurrentGame } from '../../redux/games';
import { getCurrentPlayer, getPlayers } from '../../redux/players';
import { Hand } from './Hand';
import './GameScene.css'
import { ProductionBar } from './ProductionBar';
type GameSceneProps = {
game: Game,
currentPlayer: Player,
players: List,
turnInfo: ApiPlayerTurnInfo,
sayReady: () => void,
prepareMove: (move: ApiPlayerMove) => void,
}
class GameScenePresenter extends Component {
render() {
return (
{!this.props.turnInfo &&
}
{this.props.turnInfo && this.turnInfoScene()}
Debug
{JSON.stringify(this.props.turnInfo, null, 2) }
);
}
turnInfoScene() {
let turnInfo = this.props.turnInfo;
let board = turnInfo.table.boards[turnInfo.playerIndex];
return
}
}
const GamePreStart = ({onReadyClicked}) => Click "ready" when you are
}
action={