asdf-j12−絵文字xx
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<link href="https://fonts.googleapis.com/css2?family=Noto+Sans+Mono:wght@400&display=swap" rel="stylesheet">
<style>
body, tt, input, font, span {
font-family: "Noto Sans Mono", monospace;
-webkit-text-size-adjust: 80%;
text-size-adjust: 80%;
}
tt#F {
line-height: 1.0;
}
</style>
</head>
<body id="gg" bgcolor="black" text="white" onKeyDown="K=event.keyCode-37">
<tt id="F" style="font-size: 220%;">
<script>
function R(H) { while (D.all["F" + (S = 40 + Math.ceil(ccc(i) * 319))].innerHTML != C); I(S, H) }
function I(T, H) { D.all["F" + T].innerHTML = H }
function ccc(cc) { j = j + 1; a = Math.sin((cc + 0.1 + j / 100) / 24); a = "" + a; b = a.slice(-8, -2); a = eval(b) / 1000000; return a }
function TS(event) { SX = event.touches[0].clientX; }
function TE(event) { EX = event.changedTouches[0].clientX; DX = EX - SX; K = -1; if (Math.abs(SX) > 30) { K = DX > 0 ? 2 : 0; } }
function HT(event) { tX = event.touches[0].clientX; FX = tX - SX; K = FX > 0 ? 2 : 0; }
function Y() {
if (K + 1) { M = [-1, 0, 1, 0][K]; } Z = P; P = P + M;
X = D.all["F" + P].innerHTML; P2 = P + 20; XX = D.all["F" + P2].innerHTML;
if (XX == C && M == 0) { P = P + 20; }
if (X == O || XX == O) { alert("GAME OVER SCORE: " + SC * 10); return }
if (X == T || XX == T) { KY = 1; Q = "<font color=\"Purple\">😼</font>"; P = P + 20; }
if (X == U || XX == U) { if (KY == 1) { SC++; YY(); } else { P = P - 20; } }
if (X == W) { P = P - M; }
if (X == N || XX == N) {
P = P - (20 * 6); while (P < 0) { P = P + 20; }
while (C != D.all["F" + P].innerHTML) { P = P - 20; }
}
I(Z, C); I(P, Q); K = -1; M = 0; ID = setTimeout(Y, 100);
}
function YY() {
D = document; M = 0; P = 370; S = ""; K = -1; P2 = 0;
C = "<font color=\"dark blue\">🐾</font>";
U = "<font color=\"Lime\">🏠</font>";
Q = "<font color=\"blue\">😺</font>";
W = "<font color=\"Maroon\">🧱</font>";
N = "<font color=\"aqua\">🔼</font>";
O = "<font color=\"white\">💀</font>";
T = "<font color=\"yellow\">🔑</font>";
E = "<INPUT TYPE=\"button\" VALUE=" + SC + " ONCLICK=\"clearTimeout(ID);YYY()\">";
// spanタグに直接埋め込むスタイルを定義
var style = "style=\"font-family: 'Noto Sans Mono', monospace;\"";
for (i = 0; i < 400; i++) {
// style属性を追加してHTML文字列を生成
S += (i % 20 ? "" : "<br>") + "<span id=F" + i + " " + style + ">" + ((i + 1) % 20 > 1 && i < 379 ? C : W) + "</span>";
}
I("", S);
for (i = 0; i < 55; i++)I(20 + Math.ceil(ccc(i) * 339), W);
for (i = 0; i < 11; i++)R(N);
I(399, E);
for (i = 0; i < (1 + (SC / 4)); i++)R(O);
for (i = 0; i < 2; i++)I(Math.ceil(360 + ccc(i) * 18), N);
R(U);
R(T);
KY = 0;
SX = 0;
gg.addEventListener("touchstart", TS);
gg.addEventListener("touchend", TE);
gg.addEventListener("touchmove", HT);
}
function YYY() { j = 0; SC = 0; YY(); Y(); }
YYY();
</script>
</tt>
</body>
</html>
使用変数
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<link href="https://fonts.googleapis.com/css2?family=Noto+Sans+Mono:wght@400&display=swap" rel="stylesheet">
<style>
body, tt, input, font, span {
font-family: "Noto Sans Mono", monospace;
-webkit-text-size-adjust: 80%;
text-size-adjust: 80%;
}
tt#F {
line-height: 1.0;
}
</style>
</head>
<body id="gg" bgcolor="black" text="white" onKeyDown="K=event.keyCode-37">
<tt id="F" style="font-size: 220%;">
<script>
function R(H) { while (D.all["F" + (S = 40 + Math.ceil(ccc(i) * 319))].innerHTML != C); I(S, H) }
function I(T, H) { D.all["F" + T].innerHTML = H }
function ccc(cc) { j = j + 1; a = Math.sin((cc + 0.1 + j / 100) / 24); a = "" + a; b = a.slice(-8, -2); a = eval(b) / 1000000; return a }
function TS(event) { SX = event.touches[0].clientX; }
function TE(event) { EX = event.changedTouches[0].clientX; DX = EX - SX; K = -1; if (Math.abs(SX) > 30) { K = DX > 0 ? 2 : 0; } }
function HT(event) { tX = event.touches[0].clientX; FX = tX - SX; K = FX > 0 ? 2 : 0; }
function Y() {
if (K + 1) { M = [-1, 0, 1, 0][K]; } Z = P; P = P + M;
X = D.all["F" + P].innerHTML; P2 = P + 20; XX = D.all["F" + P2].innerHTML;
if (XX == C && M == 0) { P = P + 20; }
if (X == O || XX == O) { alert("GAME OVER SCORE: " + SC * 10); return }
if (X == T || XX == T) { KY = 1; Q = "<font color=\"Purple\">😼</font>"; P = P + 20; }
if (X == U || XX == U) { if (KY == 1) { SC++; YY(); } else { P = P - 20; } }
if (X == W) { P = P - M; }
if (X == N || XX == N) {
P = P - (20 * 6); while (P < 0) { P = P + 20; }
while (C != D.all["F" + P].innerHTML) { P = P - 20; }
}
I(Z, C); I(P, Q); K = -1; M = 0; ID = setTimeout(Y, 100);
}
function YY() {
D = document; M = 0; P = 370; S = ""; K = -1; P2 = 0;
C = "<font color=\"dark blue\">🐾</font>";
U = "<font color=\"Lime\">🏠</font>";
Q = "<font color=\"blue\">😺</font>";
W = "<font color=\"Maroon\">🧱</font>";
N = "<font color=\"aqua\">🔼</font>";
O = "<font color=\"white\">💀</font>";
T = "<font color=\"yellow\">🔑</font>";
E = "<INPUT TYPE=\"button\" VALUE=" + SC + " ONCLICK=\"clearTimeout(ID);YYY()\">";
// spanタグに直接埋め込むスタイルを定義
var style = "style=\"font-family: 'Noto Sans Mono', monospace;\"";
for (i = 0; i < 400; i++) {
// style属性を追加してHTML文字列を生成
S += (i % 20 ? "" : "<br>") + "<span id=F" + i + " " + style + ">" + ((i + 1) % 20 > 1 && i < 379 ? C : W) + "</span>";
}
I("", S);
for (i = 0; i < 55; i++)I(20 + Math.ceil(ccc(i) * 339), W);
for (i = 0; i < 11; i++)R(N);
I(399, E);
for (i = 0; i < (1 + (SC / 4)); i++)R(O);
for (i = 0; i < 2; i++)I(Math.ceil(360 + ccc(i) * 18), N);
R(U);
R(T);
KY = 0;
SX = 0;
gg.addEventListener("touchstart", TS);
gg.addEventListener("touchend", TE);
gg.addEventListener("touchmove", HT);
}
function YYY() { j = 0; SC = 0; YY(); Y(); }
YYY();
</script>
</tt>
</body>
</html>
使用変数
a | |
b | |
bgcolor | |
C | |
ccc -------( Function ) | |
charset | |
color | |
D | |
DX | |
E | |
EX | |
family | |
FX | |
href | |
HT -------( Function ) | |
I -------( Function ) | |
i | |
id | |
ID | |
innerHTML | |
j | |
K | |
KY | |
M | |
N | |
O | |
ONCLICK | |
onKeyDown | |
P2 | |
P | |
Q | |
R -------( Function ) | |
rel | |
S | |
SC | |
style | |
SX | |
T | |
TE -------( Function ) | |
text | |
TS -------( Function ) | |
tX | |
TYPE | |
U | |
VALUE | |
W | |
wght@400&display | |
X | |
XX | |
Y -------( Function ) | |
YY -------( Function ) | |
YYY -------( Function ) | |
Z |