added cards and basic gamestate communication via websocket

This commit is contained in:
2023-03-17 09:54:32 +01:00
parent 2a39573f88
commit bc95b7eff3
61 changed files with 102 additions and 28 deletions

View File

@@ -0,0 +1,24 @@
import React, {FunctionComponent} from 'react';
import Card from "./Card";
interface Props {
hand: string[];
actionOnClick: (cardString: string) => void;
isHidden?: boolean;
}
const Hand: FunctionComponent<Props> = ({hand, actionOnClick, isHidden}) => {
return (
<div className="hand">
{
hand.map((card, index) => {
return (
<Card key={index} cardString={card} handleClick={actionOnClick} isHidden={isHidden}/>
)
})
}
</div>
)
}
export default Hand;