1<!DOCTYPE html>
2<html lang="en">
3<head>
4 <meta charset="UTF-8" />
5 <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6 <title>Game of Life — Tests</title>
7 <style>
8 :root {
9 --bg: #0a0e14;
10 --panel: #11161f;
11 --border: #232b38;
12 --text: #d7dde7;
13 --dim: #8a94a6;
14 --green: #3fb950;
15 --red: #f85149;
16 }
17 body {
18 margin: 0;
19 background: var(--bg);
20 color: var(--text);
21 font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
22 padding: 32px 16px;
23 }
24 .wrap { max-width: 760px; margin: 0 auto; }
25 h1 { font-size: 1.4rem; margin: 0 0 4px; }
26 p.sub { color: var(--dim); margin: 0 0 20px; }
27 .summary {
28 font-size: 1.05rem;
29 font-weight: 600;
30 padding: 12px 16px;
31 border-radius: 10px;
32 border: 1px solid var(--border);
33 background: var(--panel);
34 margin-bottom: 18px;
35 }
36 .summary.pass { color: var(--green); border-color: var(--green); }
37 .summary.fail { color: var(--red); border-color: var(--red); }
38 ul { list-style: none; margin: 0; padding: 0; }
39 li {
40 display: flex;
41 align-items: baseline;
42 gap: 12px;
43 padding: 10px 14px;
44 border: 1px solid var(--border);
45 border-radius: 8px;
46 background: var(--panel);
47 margin-bottom: 8px;
48 }
49 .tag {
50 font-size: 0.72rem;
51 font-weight: 700;
52 letter-spacing: 0.04em;
53 padding: 2px 7px;
54 border-radius: 5px;
55 flex: none;
56 }
57 li.pass .tag { background: rgba(63,185,80,0.15); color: var(--green); }
58 li.fail .tag { background: rgba(248,81,73,0.15); color: var(--red); }
59 .msg { flex: 1; }
60 .detail {
61 display: block;
62 width: 100%;
63 color: var(--dim);
64 font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
65 font-size: 0.8rem;
66 margin-top: 4px;
67 }
68 a { color: #58a6ff; }
69 </style>
70</head>
71<body>
72 <div class="wrap">
73 <h1>Game of Life — Rule Tests</h1>
74 <p class="sub">Exercising the next-generation rules. <a href="index.html">← Back to the explorer</a></p>
75 <div id="summary" class="summary">Running…</div>
76 <ul id="results"></ul>
77 </div>
78
79 <script src="life.js"></script>
80 <script src="tests.js"></script>
81</body>
82</html>
83
Discussion
No comments yet. Start the discussion. Recorded by @patrick-toulme.