Skip to content

Commit

Permalink
v5.0.0-alpha.265: Nim/Kayles AutoGUIs (#99)
Browse files Browse the repository at this point in the history
* Kayles image autogui
* Nim/Kayles/DawsonsChess SVGs
  • Loading branch information
cameroncheung00 committed Sep 24, 2023
1 parent a740c68 commit 11d0551
Show file tree
Hide file tree
Showing 23 changed files with 375 additions and 109 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.264"
"version": "5.0.0-alpha.265"
}
1 change: 0 additions & 1 deletion src/components/units/AppGameVariants.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
<div v-if="gameCustom" v-on:click="customBoardRoute">
<img :src="getLogoSource('custom')" :alt="game.name + ' ' + 'Custom Logo'" style="width: 8rem" />
<p>Custom</p>
<i>Data Status: N/A</i>
</div>
</div>
</div>
Expand Down
10 changes: 5 additions & 5 deletions src/components/units/GameBody/ImageAutoGUI.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

<!-- Draw Entities -->
<g v-for="(cell, i) in richPositionData.board" :key="'cell' + i">
<image class="entity" v-if="cell != '-' && Object.keys(entities).includes(cell)"
<image class="entity" v-if="cell != '-' && cell in entities"
:id="'entity' + i"
:x="centers[i][0] - 0.5 * entities[cell].scale * widthFactor"
:y="centers[i][1] - 0.5 * entities[cell].scale * widthFactor"
Expand Down Expand Up @@ -54,7 +54,7 @@
@click="!isComputerTurn && store.dispatch(actionTypes.runMove, { move: token.move.str })"/>

<!-- Else use the svg corresponding to the move token. If no svg is mapped to the character, skip. -->
<g v-else-if="Object.keys(entities).includes(token.token)">
<g v-else-if="token.token in entities">
<mask :id="'svgmask' + i">
<image
:x="centers[token.to][0] - 0.5 * entities[token.token].scale * widthFactor"
Expand Down Expand Up @@ -95,8 +95,8 @@
:x2="centers[line.to][0]"
:y2="centers[line.to][1]"
:stroke-linecap="'round'"
:style="'--w: ' + lineWidth + ';--w2: ' + (lineWidth * 1.75) + ';'"
:stroke-width="lineWidth"
:style="'--w: ' + lineWidth * widthFactor + ';--w2: ' + (lineWidth * widthFactor * 1.75) + ';'"
:stroke-width="lineWidth * widthFactor"
:class="'app-game-board-default-line ' + getBoardMoveElementHintClass(line.move)"
:opacity="options.showNextMoveHints && options.showNextMoveDeltaRemotenesses ? line.move.hintOpacity : 1"
@click="!isComputerTurn && store.dispatch(actionTypes.runMove, { move: line.move.str })"/>
Expand Down Expand Up @@ -162,7 +162,7 @@
const foregroundImagePath = computed(() => theTheme.value.foreground || "");
const arrowWidth = computed(() =>
(theTheme.value.arrowWidth * widthFactor.value / 2) || 1.5);
const lineWidth = computed(() => theTheme.value.lineWidth || 0.9);
const lineWidth = computed(() => theTheme.value.lineWidth || 0.04);
const defaultMoveTokenRadius = computed(() =>
(theTheme.value.circleButtonRadius * widthFactor.value) || 2);
const entitiesOverArrows = computed(() => theTheme.value.entitiesOverArrows || false);
Expand Down
5 changes: 1 addition & 4 deletions src/models/images/svg/dawsonschess/b.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 19 additions & 0 deletions src/models/images/svg/dawsonschess/grid.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 0 additions & 8 deletions src/models/images/svg/dawsonschess/o.svg

This file was deleted.

3 changes: 2 additions & 1 deletion src/models/images/svg/dawsonschess/x.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions src/models/images/svg/general/basichitbox.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions src/models/images/svg/kayles/grid.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
169 changes: 169 additions & 0 deletions src/models/images/svg/kayles/x.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 13 additions & 9 deletions src/models/images/svg/konane/grid4x4.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 14 additions & 10 deletions src/models/images/svg/konane/grid4x5.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 15 additions & 10 deletions src/models/images/svg/konane/grid5x5.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 11d0551

Please sign in to comment.