-
Notifications
You must be signed in to change notification settings - Fork 0
/
gameboard.html
219 lines (207 loc) · 7.88 KB
/
gameboard.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
<!DOCTYPE html>
<html lang="ja">
<!-- HEAD -->
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>21 - Survival Game -</title>
<link rel="stylesheet" type="text/css" href="css/gameboard.css" />
<link rel="stylesheet" type="text/css" href="css/pop_up.css" />
<link rel="stylesheet" type="text/css" href="css/sp_window+cards.css" />
</head>
<!-- END of HEAD -->
<!-- BODY -->
<body>
<!-- <h1>21</h1> -->
<!-- .YOUR or .ENEMY -->
<div class="container">
<div id="infoBoard" class="wrapper">
<div id="message">
<p id="header"><span class="YOUR">WELCOME</span> CHALLENGER!</p>
<p id="notice"></p>
<!-- Example:
<p id="header"><span class="YOUR">YOUR</span> TURN</p>
<p id="notice">SPカードの効果は発動しなかったようだ...</p>
-->
</div>
</div>
<!-- ENEMY -->
<div id="gameBoard" class="wrapper">
<div id="EN_Hand">
<img class="Hand" src="img/en/hand.png" alt="Enemy's Hand" />
<!-- Example:
<img class="Hand lost" src="img/en/lost/02.png" />
<img class="Hand select" src="img/en/select/03.png" />
<img class="Hand select" src="img/en/select/04.png" />
-->
</div>
<div id="EN_Cards">
<!-- Example:
<div class="numCard back"></div>
<div class="numCard">4</div>
<div class="numCard">8</div>
-->
</div>
<div id="EN_PassiveSP">
<!-- Example:
<div class="spCard spID21"></div>
<div class="spCard spID21"></div>
-->
</div>
<div id="Blank"></div>
<div id="EN_countNum">
<!-- Example:
<span class="enHandSum">18+?</span>/<span class="goal">21</span>
-->
<span id="enHandSum">--</span>/<span class="goal">--</span>
</div>
<!-- END of Enemy's Graphics -->
<!-- My Graphix -->
<div id="MY_Hand">
<img class="Hand" src="img/my/hand.png" alt="My Hand" />
<!-- Example:
<img class="Hand lost" src="img/my/lost/01.png" />
<img class="Hand select" src="img/my/select/02.png" />
-->
</div>
<div id="MY_Cards">
<!-- Example:
<div class="numCard back"><div>11</div></div>
<div class="numCard">7</div>
<div class="numCard">3</div>
-->
</div>
<div id="MY_PassiveSP">
<!-- Example:
<div class="spCard spID22"></div>
<div class="spCard spID23"></div>
-->
</div>
<div id="MY_Info">
<div id="user_info">USER NAME<br />ID : USER_ID</div>
</div>
<div id="MY_countNum">
<!-- Example:
<span class="myHandSum">17</span>/<span class="goal">21</span>
or
<span class="myHandSum just">21</span>/<span class="goal">21</span>
or
<span class="myHandSum burst">24</span>/<span class="goal">21</span>
-->
<span id="myHandSum">--</span>/<span class="goal">--</span>
</div>
<!-- END of My Graphics -->
</div>
<!-- END of gameBoard -->
<!-- infoBorder -->
<div id="infoBorder" hidden>
<div id="infoBdrImg" hidden><img src="img/10000yen.png"></div>
<p id="infoBdrMsg">ここにメッセージを挿入</p>
<div class="infoBtnContainer">
<button id="btn1st" class="infoBtn" type="button" hidden>BUTTON-01</button>
<button id="btn2nd" class="infoBtn" type="button" hidden>BUTTON-02</button>
</div>
</div>
<!-- infoPopUp -->
<div id="infoPopUp" hidden>
<div id="infoSP" hidden>
<div id="SPimg" class=""></div>
<p id="SPname">SPカード名</p>
<p id="SPtext">SPカードの詳細情報</p>
</div>
<div id="infoMsg">ここにメッセージを挿入</div>
<div class="infoBtnContainer">
<button id="btnPop" class="infoBtn" type="button">OK</button>
</div>
</div>
<!-- END of infoPopUp -->
<!-- MY Commands -->
<div id="MY_Commands">
<div id="comBtnContainer">
<button id="btnStay" type="button" class="clear_btn" disabled>STAY</button>
<button id="btnDraw" type="button" class="clear_btn" disabled>DRAW</button>
</div>
<input id="SP_btn" type="checkbox" class="clear_btn" name="SP_Window" />
<label for="SP_btn" id="label_SP_btn" title="SPカードを使用します">
<div id="divSPBtn">
<!-- Example:
SP CARD <span class="label_SP_btn">4</span>
-->
SP CARD <span>--</span>
</div>
</label>
<!-- SP_Window -->
<div id="SP_Window">
<!-- Example:
<div id="sp0" class="spPrev spID12">
<input type="button" name="useSP" value="12">
</div>
<div id="sp1" class="spPrev"></div>
...
-->
<div id="spText">
<!-- Example:
<div class='spIDXXtxt'>
<p class='SPname'>SPカード名</p>
<p class='SPtext'>SPカードの説明</p>
</div>
-->
</div>
</div>
<!-- END of SP_Window -->
</div>
<!-- END of MY Commands -->
</div>
<!-- END of container -->
<script>
// export to "js/main.js"
// infoBoard
const pHeader = document.querySelector("#header");
const pNotice = document.querySelector("#notice");
// gameBoard
const divSPBtn = document.querySelector("#divSPBtn");
const divMyCard = document.querySelector("#MY_Cards");
const divEnCard = document.querySelector("#EN_Cards");
const spanMySum = document.querySelector("#myHandSum");
const spanEnSum = document.querySelector("#enHandSum");
const spanGoal = document.querySelectorAll("span.goal");
const divMyPassSP = document.querySelector("#MY_PassiveSP");
const divEnPassSP = document.querySelector("#EN_PassiveSP");
const divMyHand = document.querySelector("#MY_Hand");
const divEnHand = document.querySelector("#EN_Hand");
// infoBorder
const infoBorder = document.querySelector("#infoBorder");
const infoBdrImg = document.querySelector("#infoBdrImg");
const infoBdrMsg = document.querySelector("#infoBdrMsg");
const infoBtnContainer = document.querySelector("#infoBorder .infoBtnContainer");
const btn1st = document.querySelector("#btn1st");
const btn2ec = document.querySelector("#btn2nd");
// infoPopUp
const divInfoPU = document.querySelector("#infoPopUp");
const divInfoSP = document.querySelector("#infoSP");
const divSPimg = document.querySelector("#SPimg");
const pSPname = document.querySelector("#SPname");
const pSPtext = document.querySelector("#SPtext");
const divInfoMsg = document.querySelector("#infoMsg");
const btnPop = document.querySelector("#btnPop");
// MY_Commands
const divMyCmd = document.querySelector("#MY_Commands");
const btnStay = document.querySelector("#btnStay");
const btnDraw = document.querySelector("#btnDraw");
const btnSP = document.querySelector("#SP_btn");
// SP_Window
const SPWindow = document.querySelector("#SP_Window");
const SPText = document.querySelector("#spText");
const MAX_SP_HAND = 16;
</script>
<script src="js/SPCard.js"></script>
<script src="js/GameStatus.js"></script>
<script src="js/main.js"></script>
<script>
const gc = new GameController("id");
document.body.onload = () => { gc.run(); };
</script>
</body>
<!-- END of BODY -->
</html>