Game Speed:
- {availableSpeeds.map(speed => (
+ {availableSpeeds.map((speed) => (
- {plots.slice(0, fieldSize).map((row, rowIndex) =>
+ {plots.slice(0, fieldSize).map((row, rowIndex) =>
row.slice(0, fieldSize).map((plot, colIndex) => {
- const hasCrop = !!plot.current;
- const isMature = !!(plot.current?.mature);
- const bgColor = getBgColor(hasCrop, isMature);
-
+ const hasCrop = !!plot.current
+ const isMature = !!plot.current?.mature
+ const bgColor = getBgColor(hasCrop, isMature)
+
return (
-
handlePlotClick(rowIndex, colIndex)}
>
- {plot.intended && !plot.current &&
🌱 {CROPS[plot.intended]?.name}
}
- {plot.current &&
{plot.current.mature ? '🌿' : '🌱'} {CROPS[plot.current.cropId]?.name}
}
+ {plot.intended && !plot.current && (
+
🌱 {CROPS[plot.intended]?.name}
+ )}
+ {plot.current && (
+
+ {plot.current.mature ? '🌿' : '🌱'}{' '}
+ {CROPS[plot.current.cropId]?.name}
+
+ )}
{plot.current && !plot.current.mature && (
)}
- );
- })
+ )
+ }),
)}