aboutsummaryrefslogtreecommitdiff
path: root/practice
diff options
context:
space:
mode:
authorSebastiano Tronto <sebastiano@tronto.net>2023-10-30 15:07:06 +0100
committerSebastiano Tronto <sebastiano@tronto.net>2023-10-30 15:07:06 +0100
commit7c049c043c8921e1b5a40da43dfe708d6b3afc59 (patch)
tree5ea7c1475af1173aeb2e9644fc2ba69585fdc52c /practice
parent1f4d73381e34b838427ea9a7553891c8de393957 (diff)
downloadscripts-7c049c043c8921e1b5a40da43dfe708d6b3afc59.tar.gz
scripts-7c049c043c8921e1b5a40da43dfe708d6b3afc59.zip
Fixed practice dr filtering
Diffstat (limited to '')
-rwxr-xr-xpractice3
1 files changed, 2 insertions, 1 deletions
diff --git a/practice b/practice
index 4e1126c..506ca13 100755
--- a/practice
+++ b/practice
@@ -54,7 +54,8 @@ dr_scramble() {
54 max="7" 54 max="7"
55 while true; do 55 while true; do
56 eo="$(tr -cd 'UDRL' < /dev/random | fold -w "$d" | head -n 1)" 56 eo="$(tr -cd 'UDRL' < /dev/random | fold -w "$d" | head -n 1)"
57 sol="$(${nissy} solve -p drud-eofb "$eo")" 57 eoinv="$(echo "$eo" | rev | sed 's/./&3/g')"
58 sol="$(${nissy} solve -p drud-eofb "$eoinv")"
58 len="$(echo "$sol" | wc -w)" 59 len="$(echo "$sol" | wc -w)"
59 if [ "$len" -ge "$min" ] && [ "$len" -le "$max" ]; then 60 if [ "$len" -ge "$min" ] && [ "$len" -le "$max" ]; then
60 break 61 break

Generated with cgit - Back to sebastiano.tronto.net