-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathindex.html
64 lines (58 loc) · 3.2 KB
/
index.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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
<link rel="stylesheet" type="text/css" href="style.css">
<link rel="shortcut icon" type="image/png" href="favicon.png"/>
<script src="https://cdn.jsdelivr.net/npm/web3@latest/dist/web3.min.js"></script>
<title>Optimistic Game of Life</title>
</head>
<body class="d-flex flex-column min-vh-100 bg-dark">
<div class="d-flex align-items-center justify-content-center">
<h1>Optimistic Game of Life</h1>
</div>
<div class="d-flex align-items-center justify-content-center" style="padding-bottom: 7px;" id="grid">
</div>
<div class="d-flex align-items-center justify-content-center">
<div class="btn-group" role="group">
<button type="button" class="btn btn-secondary" id="btn-connect" onclick="ethEnabled()">Connect wallet</button>
<button type="button" class="btn btn-secondary" id="connected" style="display: none"></button>
<button type="button" class="btn btn-secondary" onclick="renderGrid()">Refresh</button>
<button type="button" class="btn btn-secondary" id="advanceButton">Advance</button>
<button type="button" class="btn btn-secondary" id="resetButton">Reset</button>
</div>
</div>
<div class="container-md text">
<h2>What?</h2>
<p>
This is an implementation of <a href="https://en.wikipedia.org/wiki/Conway's_Game_of_Life"><u>Conway's game of life</u></a>, written in solidity and running on Optimistic Ethereum.<br>
The rules are: <br>
<ol>
<li>Any live cell with fewer than two live neighbours dies, as if by underpopulation.</li>
<li>Any live cell with two or three live neighbours lives on to the next generation.</li>
<li>Any live cell with more than three live neighbours dies, as if by overpopulation.</li>
<li>Any dead cell with exactly three live neighbours becomes a live cell, as if by reproduction.</li>
</ol>
You can only reset the board to its starting position and advance by one step at a time.
</p>
</div>
<div class="container-md text">
<h2>Why so small?</h2>
<p>
While it is very much possible to go beyond the current 5x5 grid, i have decided to keep it like this to keep gas costs reasonable and reduce overall bloat.
</p>
</div>
<footer class="footer mt-auto py-3 bg-dark text ">
<div class="container">
<span class="text-muted">Made by <a href="https://github.com/makemake-kbo/Optimistic-Game-of-Life" style="color: #fff;text-decoration: none;">makemake</a>. Licensed under 3BSD.</span>
</div>
</footer>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p" crossorigin="anonymous"></script>
<script type="text/javascript" src="./scripts/contractinfo.js"></script>
<script type="text/javascript" src="./scripts/web3.js"></script>
<script type="text/javascript" src="./scripts/contractFunctions.js"></script>
<script type="text/javascript" src="./scripts/renderGrid.js"></script>
</body>
</html>