diff --git a/src/assets/gameview.scss b/src/assets/gameview.scss index 2f389cc..593e761 100644 --- a/src/assets/gameview.scss +++ b/src/assets/gameview.scss @@ -8,7 +8,6 @@ margin-right: auto; padding: 5px; display: flex; - .stretch { flex: 1; } diff --git a/src/assets/images/Actions/Call.png b/src/assets/images/Actions/Call.png new file mode 100644 index 0000000..20c006e Binary files /dev/null and b/src/assets/images/Actions/Call.png differ diff --git a/src/assets/images/Actions/Check.png b/src/assets/images/Actions/Check.png new file mode 100644 index 0000000..a8a33e1 Binary files /dev/null and b/src/assets/images/Actions/Check.png differ diff --git a/src/assets/images/Actions/Fold.png b/src/assets/images/Actions/Fold.png new file mode 100644 index 0000000..04aeab6 Binary files /dev/null and b/src/assets/images/Actions/Fold.png differ diff --git a/src/assets/images/Actions/Raise.png b/src/assets/images/Actions/Raise.png new file mode 100644 index 0000000..d158211 Binary files /dev/null and b/src/assets/images/Actions/Raise.png differ diff --git a/src/assets/images/Tokens/Token_Black_100.png b/src/assets/images/Tokens/Token_Black_100.png new file mode 100644 index 0000000..c32c414 Binary files /dev/null and b/src/assets/images/Tokens/Token_Black_100.png differ diff --git a/src/assets/images/Tokens/Token_Blue_10.png b/src/assets/images/Tokens/Token_Blue_10.png new file mode 100644 index 0000000..6e0b617 Binary files /dev/null and b/src/assets/images/Tokens/Token_Blue_10.png differ diff --git a/src/assets/images/Tokens/Token_Green_25.png b/src/assets/images/Tokens/Token_Green_25.png new file mode 100644 index 0000000..068f94c Binary files /dev/null and b/src/assets/images/Tokens/Token_Green_25.png differ diff --git a/src/assets/images/Tokens/Token_Red_5.png b/src/assets/images/Tokens/Token_Red_5.png new file mode 100644 index 0000000..6a22bec Binary files /dev/null and b/src/assets/images/Tokens/Token_Red_5.png differ diff --git a/src/assets/images/Tokens/Token_White_1.png b/src/assets/images/Tokens/Token_White_1.png new file mode 100644 index 0000000..fbfd15e Binary files /dev/null and b/src/assets/images/Tokens/Token_White_1.png differ diff --git a/src/assets/leducholdem.scss b/src/assets/leducholdem.scss index 3213d32..767ff96 100644 --- a/src/assets/leducholdem.scss +++ b/src/assets/leducholdem.scss @@ -1,5 +1,13 @@ @import "cards.css"; .leduc-holdem-wrapper { + width: 100%; + height: 100%; + background-color: #C3CDFF; + // background-image: url("./images/table.png"); + // background-repeat: no-repeat; + // background-size: 100% 70%; + // background-position: bottom; + position: relative; .played-card-area { font-size: 12px; @@ -8,17 +16,41 @@ display: flex; justify-content: center; + .timer.fade-in { + visibility: hidden; + opacity: 0; + } + + .timer.fade-out { + visibility: hidden; + transition: visibility 0.1s, opacity 0.05s; + opacity: 0; + } + + .timer { + visibility: visible; + transition: visibility 0s, opacity 0.2s, transform 0.3s; + opacity: 1; + width: 51px; + height: 60px; + .timer-text { + color: #303133; + margin-top: 3px; + font-size: 23px; + font-weight: bold; + text-shadow: 0 2px 2px #909399; + line-height: 57px; + } + text-align: center; + background-image: url("./images/timer.png"); + background-repeat: no-repeat; + background-size: 100% 100%; + } + .non-card { display: table; - width: 280px; - height: 100px; - - span { - display: table-cell; - vertical-align: middle; - text-align: center; - font-size: 16px; - } + width: 80px; + height: 40px; } } @@ -37,14 +69,11 @@ font-size: 16px; width: 130px; height: 130px; - border-radius: 25px; - border: 2px solid #73AD21; - display: table; - + div { + text-align: center; + } span { white-space: pre; - display: table-cell; - vertical-align: middle; text-align: center; } } @@ -96,16 +125,17 @@ margin-top: -75px; width: 130px; height: 150px; - border-radius: 25px; - border: 2px solid blue; display: table; .info-area { display: table-cell; vertical-align: middle; text-align: center; + font-size: 20px; + font-weight: bold; + text-shadow: 0 2px 2px rgba(0, 0, 0, 0.87); + color: #F2F6FC; } - .playingCards { transform: translate(3px, 10px); } diff --git a/src/components/GameBoard/LeducHoldemGameBoard.js b/src/components/GameBoard/LeducHoldemGameBoard.js index 097946e..262b8c5 100644 --- a/src/components/GameBoard/LeducHoldemGameBoard.js +++ b/src/components/GameBoard/LeducHoldemGameBoard.js @@ -2,17 +2,65 @@ import React from 'react'; import { translateCardData, millisecond2Second } from '../../utils' import '../../assets/leducholdem.scss'; +import Player1 from '../../assets/images/Portrait/Player1.png' +import Player2 from '../../assets/images/Portrait/Player2.png' +import PlaceHolderPlayer from '../../assets/images/Portrait/Player.png'; + +import Chip from '@material-ui/core/Chip'; +import Avatar from '@material-ui/core/Avatar'; class LeducHoldemGameBoard extends React.Component { constructor(props) { super(props); } + computePlayerPortrait(playerId, playerIdx){ + if(this.props.playerInfo.length > 0){ + return this.props.playerInfo[playerIdx].id === 0 ? +