Next | Program Repair Shop | 173 |
A red flag is a warning that something might be wrong
Not every red flag requires that something be fixed
I'm just giving good advice
Not all of it will work all the time
my ($x1, $y1, $x2, $y2, $x3, $y3) = @$win;
I said that similarly-named variables are a red flag
They should almost always be replaced by an array
Try it both ways
The array was a loser:
if ($board->[$x[0]][$y[0]] eq $board->[$x[1]][$y[1]] && $board->[$x[0]][$y[0]] eq $board->[$x[2]][$y[2]]) { return $board->[$x[0]][$y[0]];
Almost always is not the same as always always
This advice is not a substitute for independent thought
Next | Copyright © 2002 M. J. Dominus |