#!/bin/bash

nt=1

function skipHand {
	while [ -e `printf src/"%03d.hand" ${nt}` ] ; do
	   echo "./twf.exe <../src/`printf "%03d.hand" ${nt}`"
	   let nt=${nt}+1
	   if [ ${nt} == 2 ] ; then echo "# NEW GROUP" ; fi
	done
}


function nextTest {
	echo "$*"
	let nt=${nt}+1
	skipHand
	return
}

skipHand
skipHand

# Subtask 1
#echo "# NEW GROUP"

skipHand

nextTest "./gen_rand.exe 3 3 540000 1000"
nextTest "./gen_rand.exe 4 4 540000 1000"
nextTest "./gen_rand.exe 5 5 540000 1000"

for ((i = 8; i <= 14; i++))
do
    nextTest "./gen_rand.exe 12 $i 540000 1000000000"
done

for ((i = 0; i < 7; i++))
do
    nextTest "./gen_ra.exe 12 14 540000 seed$i"
done

# Subtask 2
echo "# NEW GROUP"

for ((i = 16; i <= 24; i++))
do
    nextTest "./gen_rand.exe 18 $i $i 1000000000"
done

for ((i = 0; i < 7; i++))
do
    nextTest "./gen_ra.exe 18 26 26 seed$i"
done

# Subtask 3
echo "# NEW GROUP"

for ((i = 0; i < 7; i++))
do
    nextTest "./gen_ra.exe 24 2 2 $i seed$i"
done

for ((i = 0; i < 7; i++))
do
    nextTest "./gen_rand.exe 24 2 2 $((999999994 + $i)) $i"
done

# Subtask 4
echo "# NEW GROUP"

for ((i = 23; i <= 26; i++))
do
    nextTest "./gen_rand.exe 24 $i $i 1000000000000000"
    nextTest "./gen_rand.exe 26 $i $i 1000000000000000"
done

for ((i = 0; i < 7; i++))
do
    nextTest "./gen_ra.exe 26 26 26 seed$i"
done
