rename ball to stone
This commit is contained in:
parent
0c8704cf80
commit
992d0a19c0
@ -6,7 +6,7 @@ import { getColorByBrightness } from "../util/ColorUtil";
|
|||||||
import BoardViewModel from "../viewmodel/BoardViewModel";
|
import BoardViewModel from "../viewmodel/BoardViewModel";
|
||||||
import PitViewModel from "../viewmodel/PitViewModel";
|
import PitViewModel from "../viewmodel/PitViewModel";
|
||||||
|
|
||||||
const BallView: FunctionComponent<{ color: string }> = ({ color }) => {
|
const StoneView: FunctionComponent<{ color: string }> = ({ color }) => {
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
style={{
|
style={{
|
||||||
@ -33,8 +33,8 @@ const HoleView: FunctionComponent<{
|
|||||||
pitViewModel: PitViewModel;
|
pitViewModel: PitViewModel;
|
||||||
onClick: () => void;
|
onClick: () => void;
|
||||||
}> = ({ pitViewModel, onClick }) => {
|
}> = ({ pitViewModel, onClick }) => {
|
||||||
const balls = [...range(pitViewModel.stoneCount)].map((i, index) => (
|
const stones = [...range(pitViewModel.stoneCount)].map((i, index) => (
|
||||||
<BallView key={index} color={pitViewModel.stoneColor} />
|
<StoneView key={index} color={pitViewModel.stoneColor} />
|
||||||
));
|
));
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@ -54,7 +54,7 @@ const HoleView: FunctionComponent<{
|
|||||||
flexWrap: "wrap",
|
flexWrap: "wrap",
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{balls}
|
{stones}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
@ -65,8 +65,8 @@ const StoreView: FunctionComponent<{
|
|||||||
gridColumn: string;
|
gridColumn: string;
|
||||||
gridRow: string;
|
gridRow: string;
|
||||||
}> = ({ context, pitViewModel, gridColumn, gridRow }) => {
|
}> = ({ context, pitViewModel, gridColumn, gridRow }) => {
|
||||||
const balls = [...range(pitViewModel.stoneCount)].map((i, index) => (
|
const stones = [...range(pitViewModel.stoneCount)].map((i, index) => (
|
||||||
<BallView key={index} color={pitViewModel.stoneColor} />
|
<StoneView key={index} color={pitViewModel.stoneColor} />
|
||||||
));
|
));
|
||||||
const textColor = getColorByBrightness(
|
const textColor = getColorByBrightness(
|
||||||
pitViewModel.pitColor,
|
pitViewModel.pitColor,
|
||||||
@ -89,7 +89,7 @@ const StoreView: FunctionComponent<{
|
|||||||
position: "relative",
|
position: "relative",
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{balls}
|
{stones}
|
||||||
<span
|
<span
|
||||||
style={{
|
style={{
|
||||||
position: "absolute",
|
position: "absolute",
|
||||||
@ -100,7 +100,7 @@ const StoreView: FunctionComponent<{
|
|||||||
color: textColor,
|
color: textColor,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{balls.length}
|
{stones.length}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user