#!/bin/tcsh
#
# Generic scoring script. Change as necessary if testing scheme is different
# than the standard used in ./run.csh.
#

#
# Start out optimistically.
#
set score = 100

#
# Since each test case is uniformly worth 4 points, the total score is computed
# simply by subtracting 4 for each non-empty diff file.
#
if (`ls diffs` != "") then
    foreach f (diffs/*)
        @ score = $score - 4
    end
endif

#
# Output the score by echoing it, to whoever might be looking.
#
echo ""
echo "Score: $score/100"
echo ""
