Web Dev Solutions

Catalin Mititiuc

aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorCatalin Mititiuc <webdevcat@proton.me>2024-06-01 11:31:35 -0700
committerCatalin Mititiuc <webdevcat@proton.me>2024-06-01 11:31:58 -0700
commite8fae51b32b6ebc4ec4e16338467b7fcc41edd11 (patch)
treebaf01092df986019346c4cc606cce2584577eed5 /test
parent9a4fec27daed58272c71e163df7df216a4252127 (diff)
WIP: use scenario template to build scenarios client-side
Diffstat (limited to 'test')
-rw-r--r--test/integration/fixtures/scenario-test.svg130
1 files changed, 6 insertions, 124 deletions
diff --git a/test/integration/fixtures/scenario-test.svg b/test/integration/fixtures/scenario-test.svg
index 9c31cd7..77afd6b 100644
--- a/test/integration/fixtures/scenario-test.svg
+++ b/test/integration/fixtures/scenario-test.svg
@@ -1,124 +1,6 @@
-<?xml version="1.0" standalone="no"?>
-<svg viewBox="-150 -150 600 800" xmlns="http://www.w3.org/2000/svg">
- <link xmlns="http://www.w3.org/1999/xhtml" rel="stylesheet" href="../css/map.css" type="text/css" />
- <style>
- g[data-edge="north"] { --i: -2; }
- g[data-edge="south"] { --i: 52; }
-
- #background {
- stroke: #304b75;
- fill: #bacae3;
- }
-
- pattern use {
- stroke: black;
- stroke-width: 0.3px;
- }
-
- .cw-60-deg {
- transform: rotate(60deg);
- }
-
- .ccw-60-deg {
- transform: rotate(-60deg);
- }
- </style>
- <defs>
- <polygon id="hex" points="0,10 8.66,5 8.66,-5 0,-10 -8.66,-5 -8.66,5"/>
-
- <line id="ast-line" x1="-1.2" y1="0" x2="1.2" y2="0"/>
-
- <pattern id="asterisk" viewBox="-8.66 -15 17.32 30" width="17.32" height="30" patternUnits="userSpaceOnUse">
- <use y="-15" href="#ast-line"/>
- <use y="-15" style="transform-origin: 0 -15px;" class="cw-60-deg" href="#ast-line"/>
- <use y="-15" style="transform-origin: 0 -15px;" class="ccw-60-deg" href="#ast-line"/>
- <use y="15" href="#ast-line"/>
- <use y="15" style="transform-origin: 0 15px;" class="cw-60-deg" href="#ast-line"/>
- <use y="15" style="transform-origin: 0 15px;" class="ccw-60-deg" href="#ast-line"/>
-
- <use x="8.66" href="#ast-line"/>
- <use x="8.66" style="transform-origin: 8.66px 0;" class="cw-60-deg" href="#ast-line"/>
- <use x="8.66" style="transform-origin: 8.66px 0;" class="ccw-60-deg" href="#ast-line"/>
- <use x="-8.66" href="#ast-line"/>
- <use x="-8.66" style="transform-origin: -8.66px 0;" class="cw-60-deg" href="#ast-line"/>
- <use x="-8.66" style="transform-origin: -8.66px 0;" class="ccw-60-deg" href="#ast-line"/>
- </pattern>
-
- <circle id="counter-base" style="r: inherit;" cx="0" cy="0" r="5"/>
-
- <g style="r: inherit;" id="number-1">
- <use style="r: inherit;" href="#counter-base"/>
- <text style="fill: var(--text-fill); transform: translateY(var(--translateY))">1</text>
- </g>
- <g style="r: inherit;" id="number-2">
- <use style="r: inherit;" href="#counter-base"/>
- <text style="fill: var(--text-fill); transform: translateY(var(--translateY))">2</text>
- </g>
- <g style="r: inherit;" id="number-3">
- <use style="r: inherit;" href="#counter-base"/>
- <text style="fill: var(--text-fill); transform: translateY(var(--translateY))">3</text>
- </g>
- <g style="r: inherit;" id="number-4">
- <use style="r: inherit;" href="#counter-base"/>
- <text style="fill: var(--text-fill); transform: translateY(var(--translateY))">4</text>
- </g>
- <g style="r: inherit;" id="number-5">
- <use style="r: inherit;" href="#counter-base"/>
- <text style="fill: var(--text-fill); transform: translateY(var(--translateY))">5</text>
- </g>
- <g style="r: inherit;" id="number-6">
- <use style="r: inherit;" href="#counter-base"/>
- <text style="fill: var(--text-fill); transform: translateY(var(--translateY))">6</text>
- </g>
- <g style="r: inherit;" id="number-7">
- <use style="r: inherit;" href="#counter-base"/>
- <text style="fill: var(--text-fill); transform: translateY(var(--translateY))">7</text>
- </g>
-
- <g id="semi-auto">
- <line x1="-2" y1="1" x2="2" y2="1"/>
- <line x1="-2" y1="2" x2="2" y2="2"/>
- </g>
-
- <g id="auto">
- <line x1="-2" y1="0" x2="2" y2="0"/>
- <line x1="-2" y1="1" x2="2" y2="1"/>
- <line x1="-2" y1="2" x2="2" y2="2"/>
- </g>
-
- <g id="rifle" style="r: inherit;" class="weapon-symbol">
- <use style="r: inherit;" href="#counter-base"/>
- <use href="#semi-auto"/>
- <line x1="0" y1="-5" x2="0" y2="5"/>
- <polyline style="fill: none;" points="-2,-3.5 0,-5 2,-3.5"/>
- </g>
-
- <g id="smg" style="r: inherit;" class="weapon-symbol">
- <use style="r: inherit;" href="#counter-base"/>
- <use href="#auto"/>
- <line x1="0" y1="-5" x2="0" y2="4.5"/>
- <line x1="-2" y1="4.5" x2="2" y2="4.5"/>
- </g>
-
- <g id="blazer" style="r: inherit;" class="weapon-symbol">
- <use style="r: inherit;" href="#counter-base"/>
- <use href="#auto"/>
- <polyline points="0,-5 0,-3 -3,-2.5 3,-1.5 0,-1 0,2.5 -3,3, 3,4 0,4.5 0,5"/>
- <polyline points="-2,-3.5 0,-5 2,-3.5"/>
- </g>
-
- <image id="counter-prone" href="counter_prone.jpg" width="10"/>
- <image id="counter-grenade" href="counter_grenade.jpg" width="10"/>
- </defs>
- <rect id="background"/>
-
+<?xml version="1.0" standalone="yes"?>
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="-10 -10 200 300">
<g class="gameboard">
- <rect id="dots" fill="url(#asterisk)"/>
-
- <g id="firing-arcs">
- <g id="shapes"/>
- <g id="lines"/>
- </g>
<g class="grid">
<g data-y="0">
<g data-x="0"><use href="#hex"/></g>
@@ -129,9 +11,9 @@
<g data-x="0"><use href="#hex"/></g>
<g data-x="1"><use href="#hex"/>
<g class="counter" data-allegiance="attacker" data-number="1">
- <use class="primary-weapon" href="#rifle"/>
- <use class="troop-number" href="#number-1"/>
- <use class="squad-number" href="#number-1"/>
+ <use class="primary-weapon" href="counters.svg#rifle"/>
+ <use class="troop-number" href="counters.svg#number-1"/>
+ <use class="squad-number" href="counters.svg#number-1"/>
</g>
</g>
<g data-x="2"><use href="#hex"/></g>
@@ -144,5 +26,5 @@
</g>
</g>
- <script href="../../map.js"></script>
+ <script/>
</svg>