Skip to content

Commit

Permalink
refactor drop table to shortcode
Browse files Browse the repository at this point in the history
use `t-spin-table` to show the extra t-spin drop options that are only available to some commands
also hold and drop are not valid subcommands of spin
  • Loading branch information
Hillosanation committed Apr 2, 2023
1 parent 876a799 commit da2a7e7
Show file tree
Hide file tree
Showing 6 changed files with 111 additions and 130 deletions.
5 changes: 3 additions & 2 deletions config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,6 @@ enableGitInfo = true
[frontmatter]
lastmod = ["lastmod", ":git", "date", "publishDate"]
publishDate = ["publishDate", "date"]
[markup.goldmark.renderer]
unsafe = true
[markup.goldmark]
[markup.goldmark.renderer]
unsafe = true
121 changes: 29 additions & 92 deletions content/sfinder/cover.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,70 +35,7 @@ ___
- **Drop** (`--drop`, `-d`): Specify what movements are usable.
- By default, it uses `softdrop`.

<div style="display: flex; flex-direction: column;">
<table>
<tr>
<td><b>Option</b></td>
<td><b>Harddrop</b></td>
<td><b>Softdrop</b></td>
<td><b>90 spins</b></td>
<td><b>180 spins</b></td>
<td><b>Must also do:</b></td>
</tr>
<tr>
<td>harddrop</td>
<td>✓</td>
<td>✗</td>
<td>✗</td>
<td>✗</td>
<td rowspan="3">-</td>
</tr>
<tr>
<td>softdrop</td>
<td>✓</td>
<td>✓</td>
<td>✓</td>
<td>✗</td>
</tr>
<tr>
<td>180</td>
<td>✓</td>
<td>✓</td>
<td>✓</td>
<td>✓</td>
</tr>
<tr>
<td>t-softdrop</td>
<td rowspan="6">✓</td>
<td rowspan="6">T only</td>
<td rowspan="6">T only</td>
<td rowspan="6">✗</td>
<td>-</td>
</tr>
<tr>
<td>tsz</td>
<td>Any T-spin</td>
</tr>
<tr>
<td>tsm</td>
<td>tss/tsd/tst (and/or minis)</td>
</tr>
<tr>
<td>tss</td>
<td>tss/tsd/tst</td>
</tr>
<tr>
<td>tsd</td>
<td>tsd/tst</td>
</tr>
<tr>
<td>tst</td>
<td>tst only</td>
</tr>
</table>
</div>

<!-- TODO: note the availability of the 180 option in sfinder v1.40 is configurable, since kick tables are customizable since then. -->
{{< sfinder-parameters/drop t-spin-table="true" >}}

- **Last Softdrop** (`--last-softdrop`, `-l`): Allows the last nth pieces to use softdrop regardless of the value of `--drop`.

Expand Down Expand Up @@ -276,34 +213,34 @@ ___
An **example CSV output** of the cover command.
<center>
<table style="text-align: center;">
<tr>
<th width="100px;">sequence</th>
<th width="100px;">vhFRQJU...</th>
<th width="100px;">vhFRQJP...</th>
</tr>
<tr>
<td>TILJSZO</td>
<td>X</td>
<td>O</td>
</tr>
<tr>
<td>TILJSOZ</td>
<td>X</td>
<td>O</td>
</tr>
<tr>
<td>TILJZSO</td>
<td>X</td>
<td>O</td>
</tr>
<tr>
<td>TILJZOS</td>
<td>X</td>
<td>O</td>
</tr>
<tr>
<td colspan="3">5036 more lines...</td>
</tr>
<tr>
<th width="100px;">sequence</th>
<th width="100px;">v115@vhFRQJU...</th>
<th width="100px;">v115@vhFRQJP...</th>
</tr>
<tr>
<td>TILJSZO</td>
<td>X</td>
<td>O</td>
</tr>
<tr>
<td>TILJSOZ</td>
<td>X</td>
<td>O</td>
</tr>
<tr>
<td>TILJZSO</td>
<td>X</td>
<td>O</td>
</tr>
<tr>
<td>TILJZOS</td>
<td>X</td>
<td>O</td>
</tr>
<tr>
<td colspan="3">5036 more lines...</td>
</tr>
</table>
</center>

Expand Down
11 changes: 2 additions & 9 deletions content/sfinder/path.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,8 @@ ___
- By default, it is `use`.
- `--H use` or `--H avoid`
- **Drop** (`--drop`, `-d`): Specify what movements sfinder uses to try and find solutions.
- By default, it uses `softdrop`.
- `--drop harddrop`: only harddrop and kicks.
- `--drop softdrop`: enabled softdrop and kicks.
- `--drop 180`: softdrop but with 180 spins.
- `--drop T-softdrop`: only the T piece is softdropped.
- `--drop any-tspin`: only the T piece is softdropped, and it must get any type of T-spin including a T-spin zero and minis.
- `--drop tss`: only the T piece is softdropped, and it must get a T-spin single, double, or triple.
- `--drop tsd`: only the T piece is softdropped, and it must get a T-spin double, or triple.
- `--drop tst`: only the T piece is softdropped, and it must get a T-spin triple.

{{< sfinder-parameters/drop t-spin-table="true" >}}
___
## Output Parameters
**Format** (`--format`, `-f`): Dictates the way the path output is written onto a file.
Expand Down
6 changes: 2 additions & 4 deletions content/sfinder/percent.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,8 @@ ___
- **Hold** (`--hold`, `-H`): Specify whether or not a hold slot is usable. By default, it is enabled.
- `--H use` or `--H avoid`
- **Drop** (`--drop`, `-d`): Specify what movements are usable. By default, it uses `softdrop`.
- `--drop harddrop`: only harddrop and kicks.
- `--drop softdrop`: enabled softdrop and kicks.
- `--drop 180`: softdrop but with 180 spins.
- `--drop T-softdrop`: only the T piece is softdropped.

{{< sfinder-parameters/drop t-spin-table="false" >}}
___
## Output Parameters
**Tree Depth** (`--tree-depth`, `-td`): determines the depth of the tree diagram of the output. The tree output checks for the sol% of the field if the first few pieces of the queue is known.
Expand Down
23 changes: 0 additions & 23 deletions content/sfinder/spin.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,19 +33,6 @@ ___
- `--clear-line 6`

**Patterns** (`--patterns`, `-p`): Determines the queues checked by sfinder. Read more about this parameter [[sfinder/parameter patterns|here]].
- **Hold** (`--hold`, `-H`): Specify whether or not a hold slot is usable.
- By default, it is `use`.
- `--H use` or `--H avoid`
- **Drop** (`--drop`, `-d`): Specify what movements sfinder uses to try and find solutions.
- By default, it uses `softdrop`.
- `--drop harddrop`: only harddrop and kicks.
- `--drop softdrop`: enabled softdrop and kicks.
- `--drop 180`: softdrop but with 180 spins.
- `--drop T-softdrop`: only the T piece is softdropped.
- `--drop any-tspin`: only the T piece is softdropped, and it must get any type of T-spin including a T-spin zero and minis.
- `--drop tss`: only the T piece is softdropped, and it must get a T-spin single, double, or triple.
- `--drop tsd`: only the T piece is softdropped, and it must get a T-spin double, or triple.
- `--drop tst`: only the T piece is softdropped, and it must get a T-spin triple.
___
## Output Parameters
**Format** (`--format`, `-f`): Dictates the way the path output is written onto a file.
Expand Down Expand Up @@ -125,16 +112,6 @@ ___
<td style="text-align: center;">-p</td>
<td>null</td>
</tr>
<tr>
<td>--hold</td>
<td style="text-align: center;">--H</td>
<td>use</td>
</tr>
<tr>
<td>--drop</td>
<td style="text-align: center;">-d</td>
<td>softdrop</td>
</tr>
</table>
</div>
<div style="flex-direction: column;">
Expand Down
75 changes: 75 additions & 0 deletions layouts/shortcodes/sfinder-parameters/drop.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
<div style="display: flex; flex-direction: column;">
<table>
<tr>
<td><b>Option</b></td>
<td><b>Harddrop</b></td>
<td><b>Softdrop</b></td>
<td><b>90 spins</b></td>
<td><b>180 spins</b></td>
<td><b>Must also do:</b></td>
</tr>
<tr>
<td>harddrop</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td rowspan="3">-</td>
</tr>
<tr>
<td>softdrop</td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td>180</td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
{{ if eq (.Get "t-spin-table") "true" }}
<tr>
<td>t-softdrop</td>
<td rowspan="6"></td>
<td rowspan="6">T only</td>
<td rowspan="6">T only</td>
<td rowspan="6"></td>
<td>-</td>
</tr>
<tr>
<td>tsz</td>
<td>Any T-spin</td>
</tr>
<tr>
<td>tsm</td>
<td>tss/tsd/tst (and/or minis)</td>
</tr>
<tr>
<td>tss</td>
<td>tss/tsd/tst</td>
</tr>
<tr>
<td>tsd</td>
<td>tsd/tst</td>
</tr>
<tr>
<td>tst</td>
<td>tst only</td>
</tr>
{{ else }}
<tr>
<td>t-softdrop</td>
<td></td>
<td>T only</td>
<td>T only</td>
<td></td>
<td>-</td>
</tr>
{{ end }}
</table>
</div>

<!-- TODO: note the availability of the 180 option in sfinder v1.40 is configurable, since kick tables are customizable since then. -->

0 comments on commit da2a7e7

Please sign in to comment.