From: "pete torrione" <pete@nowhere.com>
Path: news.mathworks.com!newsfeed-00.mathworks.com!webcrossing
Newsgroups: comp.soft-sys.matlab
Subject: Re: grade function
Message-ID: <ef55232.12@webcrossing.raydaftYaTP>
Date: Wed, 9 May 2007 15:10:59 -0400
References: <ef55232.5@webcrossing.raydaftYaTP> <ef55232.7@webcrossing.raydaftYaTP> <ef55232.8@webcrossing.raydaftYaTP> <ef55232.9@webcrossing.raydaftYaTP> <ef55232.10@webcrossing.raydaftYaTP>
Lines: 19
NNTP-Posting-Host: 152.3.196.79
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
Xref: news.mathworks.com comp.soft-sys.matlab:407981



Marko wrote:
>
>
> Can somebody explain me this line in the grade.m function?
>
> if tb(f) && board(f(2),f(1))>0 % valid pick
>
> why isn't board(f(1),f(2)) checked? Do I have to read the contest
> rules more carefully?

I have the same question. This seems odd:

board = [1 5 0];
score = grade(board,[1 1 1 3])
gives 7 (because the jump is invalid)

but
score = grade(board,[1 1 3 1])
gives 2; the expected score, i thought...