diff options
| author | Sebastiano Tronto <sebastiano@tronto.net> | 2025-04-22 14:17:03 +0200 |
|---|---|---|
| committer | Sebastiano Tronto <sebastiano@tronto.net> | 2025-04-22 14:17:03 +0200 |
| commit | ac652bb6fb45099008e862e3ced650299dc3ebb7 (patch) | |
| tree | 12fb1c902c271fbeac41c4ee416cf1cd76b16fd7 /utils/gentranstests.sh | |
| parent | 71e104d84b3538e15f27df79b151e6b49cbad1eb (diff) | |
| parent | e391c4624055138f075c0e5772ccaf8ede094b5a (diff) | |
| download | nissy-core-ac652bb6fb45099008e862e3ced650299dc3ebb7.tar.gz nissy-core-ac652bb6fb45099008e862e3ced650299dc3ebb7.zip | |
Merge branch 'master' into extend_moves
Diffstat (limited to 'utils/gentranstests.sh')
| -rwxr-xr-x | utils/gentranstests.sh | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/utils/gentranstests.sh b/utils/gentranstests.sh deleted file mode 100755 index a257a0a..0000000 --- a/utils/gentranstests.sh +++ /dev/null | |||
| @@ -1,35 +0,0 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | |||
| 3 | outdir="./generated_trans_tests" | ||
| 4 | |||
| 5 | mkdir -p "$outdir" | ||
| 6 | i=100 | ||
| 7 | |||
| 8 | while read -r line; do | ||
| 9 | [ -z "$line" ] && continue | ||
| 10 | |||
| 11 | trans_piece="$(echo "$line" | awk '{print $1}' | tr -d 'rm')" | ||
| 12 | move1="$(echo "$line" | awk '{print $2}')" | ||
| 13 | move2="$(echo "$line" | awk '{print $3}')" | ||
| 14 | |||
| 15 | rotation="rotation $trans_piece" | ||
| 16 | |||
| 17 | file1="$(ls cubes | grep "move_.*_${move1}.txt")" | ||
| 18 | file2="$(ls cubes | grep "move_.*_${move2}.txt")" | ||
| 19 | echo "$rotation" >"$outdir/${i}_${trans_piece}r_${move1}.in" | ||
| 20 | cat "cubes/$file1" >>"$outdir/${i}_${trans_piece}r_${move1}.in" | ||
| 21 | cp "cubes/$file2" "$outdir/${i}_${trans_piece}r_${move1}.out" | ||
| 22 | |||
| 23 | i=$((i+1)) | ||
| 24 | |||
| 25 | mirrored="mirrored $trans_piece" | ||
| 26 | move2m="$(echo "${move2}" | tr 'LR' 'RL')3" | ||
| 27 | |||
| 28 | file1="$(ls cubes | grep "move_.*_${move1}.txt")" | ||
| 29 | file2="$(ls cubes | grep "move_.*_${move2m}.txt")" | ||
| 30 | echo "$mirrored" >"$outdir/${i}_${trans_piece}m_${move1}.in" | ||
| 31 | cat "cubes/$file1" >>"$outdir/${i}_${trans_piece}m_${move1}.in" | ||
| 32 | cp "cubes/$file2" "$outdir/${i}_${trans_piece}m_${move1}.out" | ||
| 33 | |||
| 34 | i=$((i+1)) | ||
| 35 | done <transform_moves.txt | ||
