Skip to content

Commit

Permalink
DeltaRem and RandomizeButton BugFixes (#111)
Browse files Browse the repository at this point in the history
  • Loading branch information
cameroncheung00 committed Feb 20, 2024
1 parent f28aac6 commit f3f979c
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,5 @@
"preview:https": "serve dist",
"reinstall": "rm -rf node_modules; yarn; vue-tsc --noEmit"
},
"version": "5.0.0-alpha.283"
"version": "5.0.0-alpha.284"
}
4 changes: 2 additions & 2 deletions src/components/units/VVH/AppGameVvhBody.vue
Original file line number Diff line number Diff line change
Expand Up @@ -172,15 +172,15 @@
:y="gridTop + roundNumber * rowHeight - rowHeight / 2"
dominant-baseline="middle"
text-anchor="middle">
{{ currentValuedRounds[roundNumber].move.substring(0,4) === 'zzzz' ? '' : currentValuedRounds[roundNumber].move }}
{{ currentValuedRounds[roundNumber].move[0] == '~' ? '' : currentValuedRounds[roundNumber].move }}
</text>
<text class="move-coordinate"
v-else
:x="gridRight + yCoordinateWidth / 2"
:y="gridTop + roundNumber * rowHeight - rowHeight / 2"
dominant-baseline="middle"
text-anchor="middle">
{{ currentValuedRounds[roundNumber].move.substring(0,4) === 'zzzz' ? '' : currentValuedRounds[roundNumber].move }}
{{ currentValuedRounds[roundNumber].move[0] == '~' ? '' : currentValuedRounds[roundNumber].move }}
</text>
</template>

Expand Down
4 changes: 0 additions & 4 deletions src/models/images/sfxoff.svg

This file was deleted.

11 changes: 8 additions & 3 deletions src/scripts/gamesmanUni/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ export const initiateMatch = async (app: Types.App, payload: {
const variant = await loadVariant(app, payload);
game.variants[payload.variantId] = variant;

const startPosition = payload.startPosition ? payload.startPosition : variant.startPosition;
const startPosition = (payload.startPosition && payload.startPosition !== 'random') ? payload.startPosition : variant.startPosition;

const updatedApp = await loadPosition(app, { ...payload, position: startPosition });
if (!updatedApp) return undefined;
Expand Down Expand Up @@ -145,7 +145,10 @@ export const initiateMatch = async (app: Types.App, payload: {
deepcopy(app.currentMatch.round)
];
playGameAmbience();
await addInstructions(app, payload);

if (payload.startPosition !== 'random') {
await addInstructions(app, payload);
}
return app;
};

Expand Down Expand Up @@ -181,7 +184,9 @@ const calculateMoveButtonOpacities = (moves: Array<GCTAPITypes.Move>) => {
formattedMoves[moves[0].move] = { ...moves[0], moveValueOpacity: 1 };
}
for (let i = 1; i < moves.length; i++) {
formattedMoves[moves[i].move] = { ...moves[i], moveValueOpacity: 1 };
if (!(moves[i].move in formattedMoves)) {
formattedMoves[moves[i].move] = { ...moves[i], moveValueOpacity: 1 };
}
const previousMove = formattedMoves[moves[i - 1].move];
const currentMove = formattedMoves[moves[i].move];
if ((previousMove.moveValue === currentMove.moveValue) || (previousMove.moveValue === 'tie' && currentMove.moveValue === 'draw')) {
Expand Down

0 comments on commit f3f979c

Please sign in to comment.