#!/bin/bash

# Please don't change this.
MAX_POINTS=150

test_feribot() {
	n_tests=25
	src_names=(feribot.c feribot.cpp Feribot.java)
	tests=($(seq 0 $(($n_tests - 1))))
	points=($(printf '1.0 %.0s' $(seq 0 $(($n_tests - 1)))))
	pmax=25

	run_problem feribot 1
}

test_nostory() {
	n_tests=25
	src_names=(nostory.c nostory.cpp Nostory.java)
	tests=($(seq 0 $(($n_tests - 1))))
	points=($(printf '1.0 %.0s' $(seq 0 $(($n_tests - 1)))))
	pmax=25

	run_problem nostory 2
}

test_sushi() {
	n_tests=30
	src_names=(sushi.c sushi.cpp Sushi.java)
	tests=($(seq 0 $(($n_tests - 1))))
	points=($(printf '1.0 %.0s' $(seq 0 $(($n_tests - 1)))))
	pmax=30

	run_problem sushi 3
}

test_semnale() {
	n_tests=30
	src_names=(semnale.c semnale.cpp Semnale.java)
	tests=($(seq 0 $(($n_tests - 1))))
	points=($(printf '1.0 %.0s' $(seq 0 $(($n_tests - 1)))))
	pmax=30

	run_problem semnale 4
}

test_badgpt() {
	n_tests=25
	src_names=(badgpt.c badgpt.cpp Badgpt.java)
	tests=($(seq 0 $(($n_tests - 1))))
	points=($(printf '1.0 %.0s' $(seq 0 $(($n_tests - 1)))))
	pmax=25

	run_problem badgpt 5
}

test_homework() {
	if [[ "$1" = "1" || "$1" = "feribot" ]]; then
		test_feribot
	elif [[ "$1" = "2" || "$1" = "nostory" ]]; then
		test_nostory
	elif [[ "$1" = "3" || "$1" = "sushi" ]]; then
		test_sushi
	elif [[ "$1" = "4" || "$1" = "semnale" ]]; then
		test_semnale
	elif [[ "$1" = "5" || "$1" = "badgpt" ]]; then
		test_badgpt
	elif [[ "$1" = "cs" ]]; then
		echo "skip running tests"
	else
		test_feribot
		test_nostory
		test_sushi
		test_semnale
		test_badgpt
	fi
}

BONUS_TASK=badgpt

# Please don't change this.
source "$(dirname "{0}")"/_utils/base_check.sh
