import React from "react"
import "../../style/player.css"
import { Team } from "../../tactic/Team"

export interface PlayerPieceProps {
    team: Team
    text: string
    hasBall : boolean
}

export function PlayerPiece({ team, text, hasBall}: PlayerPieceProps) {
    let className = `player-piece ${team}`
    if (hasBall) {
        className += ` player-piece-has-ball`
    }

    return (
        <div className={className}>
            <p>{text}</p>
        </div>
    )
}
