tinker-reversi 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +26 -0
- package/dist/assets/index-CuF3OwS6.css +1 -0
- package/dist/assets/index-DJDOR1jz.js +3872 -0
- package/dist/images/fabric.jpg +0 -0
- package/dist/images/fabric_normal.jpg +0 -0
- package/dist/images/wood.jpg +0 -0
- package/dist/images/wood_normal.jpg +0 -0
- package/dist/index.html +128 -0
- package/dist/sound/place.mp3 +0 -0
- package/icon.png +0 -0
- package/package.json +30 -0
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/dist/index.html
ADDED
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<meta
|
|
6
|
+
name="viewport"
|
|
7
|
+
content="width=device-width, initial-scale=1.0, viewport-fit=cover"
|
|
8
|
+
/>
|
|
9
|
+
<title>Reversi</title>
|
|
10
|
+
<script type="module" crossorigin src="./assets/index-DJDOR1jz.js"></script>
|
|
11
|
+
<link rel="stylesheet" crossorigin href="./assets/index-CuF3OwS6.css">
|
|
12
|
+
</head>
|
|
13
|
+
<body>
|
|
14
|
+
<main id="app">
|
|
15
|
+
<div id="ui">
|
|
16
|
+
<header class="topbar">
|
|
17
|
+
<button id="menuButton" class="ghost-button" type="button">
|
|
18
|
+
Menu
|
|
19
|
+
</button>
|
|
20
|
+
<div class="scoreboard" aria-label="Score">
|
|
21
|
+
<div class="score black-score">
|
|
22
|
+
<span class="score-stone black"></span>
|
|
23
|
+
<strong id="blackScore">2</strong>
|
|
24
|
+
</div>
|
|
25
|
+
<div class="score-divider">:</div>
|
|
26
|
+
<div class="score white-score">
|
|
27
|
+
<strong id="whiteScore">2</strong>
|
|
28
|
+
<span class="score-stone white"></span>
|
|
29
|
+
</div>
|
|
30
|
+
</div>
|
|
31
|
+
<div class="turn-pill" id="turnPill">
|
|
32
|
+
<span class="turn-stone black" id="turnStone"></span>
|
|
33
|
+
<span id="turnText">Black to move</span>
|
|
34
|
+
</div>
|
|
35
|
+
<div class="top-actions">
|
|
36
|
+
<button
|
|
37
|
+
id="soundButton"
|
|
38
|
+
class="ghost-button icon-button"
|
|
39
|
+
type="button"
|
|
40
|
+
aria-label="Sound"
|
|
41
|
+
aria-pressed="true"
|
|
42
|
+
>
|
|
43
|
+
<svg class="sound-icon" viewBox="0 0 24 24" aria-hidden="true">
|
|
44
|
+
<path d="M4 9v6h4l5 4V5L8 9H4Z" />
|
|
45
|
+
<path
|
|
46
|
+
class="sound-waves"
|
|
47
|
+
d="M16 9a4 4 0 0 1 0 6M18.5 6.5a7.5 7.5 0 0 1 0 11"
|
|
48
|
+
/>
|
|
49
|
+
<path class="sound-off-line" d="m17 9 4 6m0-6-4 6" />
|
|
50
|
+
</svg>
|
|
51
|
+
</button>
|
|
52
|
+
</div>
|
|
53
|
+
</header>
|
|
54
|
+
|
|
55
|
+
<section id="menu" class="overlay">
|
|
56
|
+
<div class="menu-panel">
|
|
57
|
+
<div class="settings-grid">
|
|
58
|
+
<div class="setting">
|
|
59
|
+
<label data-i18n="mode">MODE</label>
|
|
60
|
+
<div class="segmented">
|
|
61
|
+
<button class="choice selected" data-mode="pvp" type="button">
|
|
62
|
+
<span data-i18n="local">LOCAL 2P</span>
|
|
63
|
+
</button>
|
|
64
|
+
<button class="choice" data-mode="pve" type="button">
|
|
65
|
+
<span data-i18n="computer">VS CPU</span>
|
|
66
|
+
</button>
|
|
67
|
+
</div>
|
|
68
|
+
</div>
|
|
69
|
+
<div class="setting" id="difficultySetting">
|
|
70
|
+
<label data-i18n="difficulty">DIFFICULTY</label>
|
|
71
|
+
<div class="segmented">
|
|
72
|
+
<button class="choice" data-difficulty="easy" type="button">
|
|
73
|
+
<span data-i18n="easy">EASY</span>
|
|
74
|
+
</button>
|
|
75
|
+
<button
|
|
76
|
+
class="choice selected"
|
|
77
|
+
data-difficulty="normal"
|
|
78
|
+
type="button"
|
|
79
|
+
>
|
|
80
|
+
<span data-i18n="normal">NORMAL</span>
|
|
81
|
+
</button>
|
|
82
|
+
<button class="choice" data-difficulty="hard" type="button">
|
|
83
|
+
<span data-i18n="hard">HARD</span>
|
|
84
|
+
</button>
|
|
85
|
+
</div>
|
|
86
|
+
</div>
|
|
87
|
+
</div>
|
|
88
|
+
<button id="startButton" class="primary-button" type="button">
|
|
89
|
+
<span data-i18n="start">START MATCH</span>
|
|
90
|
+
</button>
|
|
91
|
+
</div>
|
|
92
|
+
</section>
|
|
93
|
+
|
|
94
|
+
<section id="result" class="overlay hidden">
|
|
95
|
+
<div class="result-panel">
|
|
96
|
+
<h2 id="resultTitle">Black wins</h2>
|
|
97
|
+
<div class="result-count">
|
|
98
|
+
<span class="result-number black-text" id="resultBlack">0</span>
|
|
99
|
+
<span>—</span>
|
|
100
|
+
<span class="result-number white-text" id="resultWhite">0</span>
|
|
101
|
+
</div>
|
|
102
|
+
<div class="result-actions">
|
|
103
|
+
<button id="againButton" class="primary-button" type="button">
|
|
104
|
+
<span data-i18n="playAgain">PLAY AGAIN</span>
|
|
105
|
+
</button>
|
|
106
|
+
<button
|
|
107
|
+
id="resultMenuButton"
|
|
108
|
+
class="secondary-button"
|
|
109
|
+
type="button"
|
|
110
|
+
data-i18n="changeMode"
|
|
111
|
+
>
|
|
112
|
+
CHANGE MODE
|
|
113
|
+
</button>
|
|
114
|
+
</div>
|
|
115
|
+
</div>
|
|
116
|
+
</section>
|
|
117
|
+
|
|
118
|
+
<div class="mobile-controls" aria-label="Board controls">
|
|
119
|
+
<button data-direction="up" type="button">↑</button>
|
|
120
|
+
<button data-direction="left" type="button">←</button>
|
|
121
|
+
<button data-action="place" type="button">●</button>
|
|
122
|
+
<button data-direction="right" type="button">→</button>
|
|
123
|
+
<button data-direction="down" type="button">↓</button>
|
|
124
|
+
</div>
|
|
125
|
+
</div>
|
|
126
|
+
</main>
|
|
127
|
+
</body>
|
|
128
|
+
</html>
|
|
Binary file
|
package/icon.png
ADDED
|
Binary file
|
package/package.json
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "tinker-reversi",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Reversi Game Plugin for TINKER",
|
|
5
|
+
"files": [
|
|
6
|
+
"dist/",
|
|
7
|
+
"icon.png"
|
|
8
|
+
],
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "git+https://github.com/liriliri/tinker-games.git"
|
|
12
|
+
},
|
|
13
|
+
"tinker": {
|
|
14
|
+
"name": "Reversi",
|
|
15
|
+
"description": "Capture territory in the classic game of Reversi.",
|
|
16
|
+
"main": "dist/index.html",
|
|
17
|
+
"icon": "icon.png",
|
|
18
|
+
"locales": {
|
|
19
|
+
"zh-CN": {
|
|
20
|
+
"name": "黑白棋",
|
|
21
|
+
"description": "在经典黑白棋中包围并翻转对手的棋子。"
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"scripts": {
|
|
26
|
+
"dev": "vite",
|
|
27
|
+
"build": "vite build",
|
|
28
|
+
"format": "prettier \"src/**/*.ts\" \"*.{html,json,ts}\" --write"
|
|
29
|
+
}
|
|
30
|
+
}
|