From 2382a452456e4bdef4584e1046925e372624cb79 Mon Sep 17 00:00:00 2001
From: Joffrey BION
Date: Thu, 16 May 2019 23:48:38 +0200
Subject: Rationalize module names
---
frontend/src/components/game/Board.css | 38 ---------
frontend/src/components/game/Board.tsx | 67 ----------------
frontend/src/components/game/CardImage.css | 4 -
frontend/src/components/game/CardImage.tsx | 26 ------
frontend/src/components/game/GameScene.css | 13 ---
frontend/src/components/game/GameScene.tsx | 77 ------------------
frontend/src/components/game/Hand.css | 50 ------------
frontend/src/components/game/Hand.tsx | 44 -----------
frontend/src/components/game/ProductionBar.css | 50 ------------
frontend/src/components/game/ProductionBar.tsx | 87 ---------------------
.../src/components/game/background-papyrus.jpg | Bin 100272 -> 0 bytes
11 files changed, 456 deletions(-)
delete mode 100644 frontend/src/components/game/Board.css
delete mode 100644 frontend/src/components/game/Board.tsx
delete mode 100644 frontend/src/components/game/CardImage.css
delete mode 100644 frontend/src/components/game/CardImage.tsx
delete mode 100644 frontend/src/components/game/GameScene.css
delete mode 100644 frontend/src/components/game/GameScene.tsx
delete mode 100644 frontend/src/components/game/Hand.css
delete mode 100644 frontend/src/components/game/Hand.tsx
delete mode 100644 frontend/src/components/game/ProductionBar.css
delete mode 100644 frontend/src/components/game/ProductionBar.tsx
delete mode 100644 frontend/src/components/game/background-papyrus.jpg
(limited to 'frontend/src/components/game')
diff --git a/frontend/src/components/game/Board.css b/frontend/src/components/game/Board.css
deleted file mode 100644
index 0600bd14..00000000
--- a/frontend/src/components/game/Board.css
+++ /dev/null
@@ -1,38 +0,0 @@
-.board {
- width: 100vw
-}
-
-.cards {
- display: flex;
- height: 40vh;
- width: 100vw;
-}
-
-.card-column {
- height: 40vh;
- margin: auto;
- position: relative;
- width: 15vw;
-}
-
-.card {
- position: absolute;
- /* dynamic positioning in JS */
-}
-
-.table-card-img {
- max-width: 10vw;
- max-height: 25vh;
-}
-
-.wonder {
- width: 100vw;
- text-align: center;
-}
-
-.wonder-img {
- border-radius: 0.5%/1.5%;
- box-shadow: 0.2rem 0.2rem 0.5rem black;
- max-height: 30vh;
- max-width: 95vw;
-}
diff --git a/frontend/src/components/game/Board.tsx b/frontend/src/components/game/Board.tsx
deleted file mode 100644
index 98298a1f..00000000
--- a/frontend/src/components/game/Board.tsx
+++ /dev/null
@@ -1,67 +0,0 @@
-import React from 'react';
-import { ApiBoard, ApiTableCard, ApiWonder } from '../../api/model';
-import './Board.css'
-import { CardImage } from './CardImage';
-
-// card offsets in % of their size when displayed in columns
-const xOffset = 20;
-const yOffset = 21;
-
-type BoardProps = {
- board: ApiBoard,
-}
-
-export const Board = ({board}: BoardProps) => {
- return ;
-};
-
-type TableCardsProps = {
- cardColumns: ApiTableCard[][],
-}
-
-const TableCards = ({cardColumns}: TableCardsProps) => {
- return
- {cardColumns.map(column =>
)}
-
-};
-
-type TableCardColumnProps = {
- cards: ApiTableCard[]
-}
-
-const TableCardColumn = ({cards}: TableCardColumnProps) => {
- return
- {cards.map((c, i) =>
)}
-
-};
-
-type TableCardProps = {
- card: ApiTableCard,
- indexInColumn: number,
-}
-
-const TableCard = ({card, indexInColumn}: TableCardProps) => {
- let style = {
- transform: `translate(${indexInColumn * xOffset}%, ${indexInColumn * yOffset}%)`,
- zIndex: indexInColumn,
- };
- return
-
-
-};
-
-type WonderProps = {
- wonder: ApiWonder,
-}
-
-const Wonder = ({wonder}: WonderProps) => {
- return
-
-
-};
diff --git a/frontend/src/components/game/CardImage.css b/frontend/src/components/game/CardImage.css
deleted file mode 100644
index 795c1503..00000000
--- a/frontend/src/components/game/CardImage.css
+++ /dev/null
@@ -1,4 +0,0 @@
-.card-img {
- border-radius: 5%;
- box-shadow: 2px 2px 5px black;
-}
diff --git a/frontend/src/components/game/CardImage.tsx b/frontend/src/components/game/CardImage.tsx
deleted file mode 100644
index a37595ad..00000000
--- a/frontend/src/components/game/CardImage.tsx
+++ /dev/null
@@ -1,26 +0,0 @@
-import React from 'react';
-import { ApiCard } from '../../api/model';
-import './CardImage.css'
-
-type CardImageProps = {
- card: ApiCard,
- otherClasses: string,
- highlightColor?: string
-}
-
-export const CardImage = ({card, otherClasses, highlightColor}: CardImageProps) => {
- const style = highlightStyle(highlightColor);
- return
-};
-
-function highlightStyle(highlightColor?: string) {
- if (highlightColor) {
- return { boxShadow: `0 0 1rem 0.1rem ${highlightColor}` };
- } else {
- return {};
- }
-}
diff --git a/frontend/src/components/game/GameScene.css b/frontend/src/components/game/GameScene.css
deleted file mode 100644
index 3417459b..00000000
--- a/frontend/src/components/game/GameScene.css
+++ /dev/null
@@ -1,13 +0,0 @@
-.gameSceneRoot {
- background: url('background-papyrus.jpg') center no-repeat;
- background-size: cover;
-}
-
-.fullscreen {
- position: fixed;
- top: 0;
- left: 0;
- bottom: 0;
- right: 0;
- overflow: hidden;
-}
diff --git a/frontend/src/components/game/GameScene.tsx b/frontend/src/components/game/GameScene.tsx
deleted file mode 100644
index 465d0840..00000000
--- a/frontend/src/components/game/GameScene.tsx
+++ /dev/null
@@ -1,77 +0,0 @@
-import { Button, Classes, Intent, NonIdealState } from '@blueprintjs/core';
-import { List } from 'immutable';
-import React, { Component } from 'react';
-import { connect } from 'react-redux';
-import { ApiPlayer, ApiPlayerMove, ApiPlayerTurnInfo } from '../../api/model';
-import { GlobalState } from '../../reducers';
-import { actions } from '../../redux/actions/game';
-import { getCurrentTurnInfo } from '../../redux/currentGame';
-import { getCurrentGame } from '../../redux/games';
-import { Board } from './Board';
-import './GameScene.css'
-import { Hand } from './Hand';
-import { ProductionBar } from './ProductionBar';
-
-type GameSceneStateProps = {
- players: List,
- turnInfo: ApiPlayerTurnInfo | null,
-}
-
-type GameSceneDispatchProps = {
- sayReady: () => void,
- prepareMove: (move: ApiPlayerMove) => void,
-}
-
-type GameSceneProps = GameSceneStateProps & GameSceneDispatchProps
-
-class GameScenePresenter extends Component {
-
- render() {
- return (
-
- {!this.props.turnInfo && }
- {this.props.turnInfo && this.turnInfoScene(this.props.turnInfo)}
-
- );
- }
-
- turnInfoScene(turnInfo: ApiPlayerTurnInfo) {
- let board = turnInfo.table.boards[turnInfo.playerIndex];
- return
-
{turnInfo.message}
-
-
-
-
- }
-}
-
-type GamePreStartProps = {
- onReadyClicked: () => void
-}
-const GamePreStart = ({onReadyClicked}: GamePreStartProps) => Click "ready" when you are
}
- action={