Created
June 11, 2020 16:31
-
-
Save arllanos/6a57c6b293c0c7280562aef3d97eb248 to your computer and use it in GitHub Desktop.
Render Minesweeper board
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const template = ` | |
<style> | |
th, td { | |
padding: .75rem 1.25rem; | |
font-size: 11px | |
} | |
.alert-info{color:#0c5460;background-color:#d1ecf1;border-color:#bee5eb;font-size:1.5rem;font-family:monospace} | |
.alert{position:relative;padding:.75rem 1.25rem;margin-bottom:1rem;border:1px solid transparent;border-radius:.25rem} | |
</style> | |
<div class="alert alert-info"> | |
<strong>References:</strong> <br> | |
<strong>* M </strong> -----> Veiled mine <br> | |
<strong>* X</strong> -----> Exploded mine <br> | |
<strong>* E</strong> -----> Veiled Empty <br> | |
<strong>* B</strong> -----> Revealed Blank <br> | |
<strong>* Digit</strong> -> Revealed with adjacent mine count <br> | |
-<strong>Note: </strong> Lowercase values inidcate flagged cell- | |
</div> | |
<table font-size: 8px> | |
{{#each this}} | |
{{#each this}} | |
<tr> | |
{{#each this }} | |
<td>{{ this }}</td> | |
{{/each}} | |
</tr> | |
{{/each}} | |
{{/each}} | |
<table> | |
` | |
pm.visualizer.set(template, { | |
response: JSON.parse(responseBody) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment