|
|
@ -6,6 +6,7 @@ import {PlayerPiece} from "./PlayerPiece";
|
|
|
|
|
|
|
|
|
|
|
|
export interface PlayerOptions {
|
|
|
|
export interface PlayerOptions {
|
|
|
|
pos: string,
|
|
|
|
pos: string,
|
|
|
|
|
|
|
|
team: string,
|
|
|
|
x: number,
|
|
|
|
x: number,
|
|
|
|
y: number,
|
|
|
|
y: number,
|
|
|
|
bounds: DraggableBounds,
|
|
|
|
bounds: DraggableBounds,
|
|
|
@ -15,7 +16,7 @@ export interface PlayerOptions {
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* A player that is placed on the court, which can be selected, and moved in the associated bounds
|
|
|
|
* A player that is placed on the court, which can be selected, and moved in the associated bounds
|
|
|
|
* */
|
|
|
|
* */
|
|
|
|
export default function CourtPlayer({pos, x, y, bounds, onRemove}: PlayerOptions) {
|
|
|
|
export default function CourtPlayer({pos, team, x, y, bounds, onRemove}: PlayerOptions) {
|
|
|
|
|
|
|
|
|
|
|
|
const ref = useRef<HTMLDivElement>(null);
|
|
|
|
const ref = useRef<HTMLDivElement>(null);
|
|
|
|
return (
|
|
|
|
return (
|
|
|
@ -42,7 +43,7 @@ export default function CourtPlayer({pos, x, y, bounds, onRemove}: PlayerOptions
|
|
|
|
className="player-selection-tab-remove"
|
|
|
|
className="player-selection-tab-remove"
|
|
|
|
onClick={() => onRemove()}/>
|
|
|
|
onClick={() => onRemove()}/>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<PlayerPiece text={pos}/>
|
|
|
|
<PlayerPiece team={team} text={pos}/>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|