swarm/web/command-matrix.html
Karl Ostmo 5f53082971
Render command matrix (#1658)
## Demo

1. Run `scripts/play.sh`
2. Load http://localhost:5357/command-matrix.html

The rows are sortable by column.

### Also

    stack build swarm:swarm-docs --fast && stack exec swarm-docs -- cheatsheet --matrix



## Screenshot

![Screenshot from 2024-01-21 21-32-56](https://github.com/swarm-game/swarm/assets/261693/f92f5ac9-8440-4aac-9a4b-9e5edac616f2)
2024-01-26 01:02:14 +00:00

37 lines
1.0 KiB
HTML

<!doctype html>
<html>
<head>
<title>Command matrix</title>
<link rel="stylesheet" href="style/tablesort.css"/>
<link rel="stylesheet" href="style/command-matrix.css"/>
<script src="https://cdnjs.cloudflare.com/ajax/libs/tablesort/5.1.0/tablesort.min.js"></script>
<script src="script/command-matrix.js"></script>
<script>
window.onload=()=>{
const tableElement = document.querySelector("table");
doFetch(tableElement);
}
</script>
</head>
<body>
<table id="my-table">
<thead>
<tr data-sort-method="none">
<th style="color: gray">Command</th>
<th>Explicit robot target</th>
<th>Pure computation</th>
<th>Modifies environment</th>
<th>Modifies robot</th>
<th>Moves robot</th>
<th>Returns value</th>
<!-- <th>Output type</th> -->
</tr>
</thead>
<tbody id="my-table-body">
</tbody>
</table>
</body>
</html>