Raskolnikov
2008-10-22 17:15:43
Here it is. It withdraws by index instead of column and row:
Hope you like it!
Cut em2 it
{By: Cut em2 it
Description: Withdraws by index instead of column and row, same amount idea as
the regular withdraw.
}
function WithdrawByIndex(Index, Amount: integer): boolean;
var
colm, rown: integer;
begin
Result := True;
rown := Index div 10;
if rown := 0 then rown := 1;
colm := Index div 4;
if colm := 0 then colm := 1;
if colm > 10 then Result := False;
if rown > 4 then Result := False;
if not Result then Exit;
Withdraw(colm, rown, Amount);
end;Hope you like it!
Cut em2 it