Skip to content

Commit b098844

Browse files
committed
fixed board edges
1 parent 3e4a606 commit b098844

File tree

4 files changed

+16
-6
lines changed

4 files changed

+16
-6
lines changed

jam-25/src/components/Joker.jsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,14 @@ const Joker = ({ sx, joker, id }) => {
2424
key={id}
2525
sx={{ boxSizing: 'border-box', m: '3px', width: '44px', height: '44px', borderRadius: '4px', fontSize: '24px', display: 'flex', justifyContent: 'center', alignItems: 'center', position: 'relative', zIndex: 3, ...joker.style }}
2626
>
27+
<Box sx={{ position: 'absolute', top: 0, right: 0, fontSize: '10px', color: 'white', backgroundColor: ['', '#7abf1f', '#34249c', '#b0102b'][joker.rarity], px: '3px', borderRadius: '2px 4px 2px 2px' }}>
28+
{['C', 'U', 'R', 'S'][joker.rarity]}
29+
</Box>
2730
<Tooltip arrow placement="bottom" title={activeJoker?.props?.id !== id ? (
2831
<Box sx={{ fontSize: 12, color: 'white', borderRadius: '4px', display: 'flex', flexDirection: 'column', alignItems: 'center', zIndex: 2 }}>
2932
<Typography variant='overline' sx={{ fontFamily: 'Orbitron' }}>{joker.name}</Typography>
3033
<Typography variant='body2' sx={{ textAlign: 'center' }}>{joker.description}</Typography>
34+
<Typography variant='overline' sx={{ fontFamily: 'Orbitron', fontSize: 8 }}>{['Common', 'Uncommon', 'Rare', 'Shiny'][joker.rarity]}</Typography>
3135
</Box>
3236
): null}>
3337
{joker.text}

jam-25/src/routes/App.jsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ const App = () => {
255255
});
256256
});
257257
// check columns
258-
for (let i = 0; i < gridArray.length; i++) {
258+
for (let i = 0; i < gridSizeX; i++) {
259259
const col = gridArray.map((row) => row[i]);
260260
const startTiles = col.filter((t, i) => t.tile != null && (i === 0 || !col[i - 1].tile));
261261
startTiles.forEach((t) => {
@@ -1032,8 +1032,8 @@ const App = () => {
10321032
<Button sx={{ fontFamily: 'Orbitron' }} disabled={u.disabled || availableFunds < u.price} onClick={() => {
10331033
if (availableFunds >= u.price) {
10341034
setFunds((old) => old - u.price);
1035-
setInventory((old) => [...old, <InventoryItem item={u} />]);
1036-
setInventoryItems((old) => [...old, <InventoryItem item={u} />]);
1035+
setInventory((old) => [...old, <InventoryItem key={u.id} item={u} />]);
1036+
setInventoryItems((old) => [...old, <InventoryItem key={u.id} item={u} />]);
10371037
setAvailableUpgrades((old) => old.map((a) => ({ ...a, disabled: a.id === u.id })));
10381038
}
10391039
}}>Buy</Button>
@@ -1087,7 +1087,7 @@ const App = () => {
10871087
<Box sx={{ display: 'flex', flexDirection: 'row', justifyContent: 'center', mb: matches ? 0 : 2, flexWrap: 'wrap' }}>
10881088
{
10891089
possibleLetters.map((l, i) => (
1090-
<InventoryTile tile={l} id={i} />
1090+
<InventoryTile key={i} tile={l} id={i} />
10911091
))
10921092
}
10931093
</Box>

jam-25/src/upgrades.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,15 +182,15 @@ export const JOKERS = [
182182
id: v4(),
183183
text: '🧠',
184184
name: 'Brainiac',
185-
description: '+3 multiplier for every valid word, but +5 multiplier for every invalid word',
185+
description: '+2 multiplier for every valid word, but +5 multiplier for every invalid word',
186186
action: ({
187187
words,
188188
grid,
189189
totalScore,
190190
validScore,
191191
invalidScore
192192
}) => {
193-
const newValid = validScore * 2;
193+
const newValid = validScore;
194194
const newInvalid = invalidScore * 4;
195195
return {
196196
newScore: totalScore + (newValid - newInvalid),

package-lock.json

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)