mirror of
https://github.com/correl/mage.git
synced 2024-11-25 03:00:11 +00:00
Fixed bug in Perl script.
This commit is contained in:
parent
39e51cbf6c
commit
11618e64ba
2 changed files with 5 additions and 1 deletions
|
@ -29,6 +29,7 @@ while(my $line = <DATA>) {
|
||||||
if ($data[1] eq $setName) {
|
if ($data[1] eq $setName) {
|
||||||
push(@setCards, \@data);
|
push(@setCards, \@data);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
close(DATA);
|
close(DATA);
|
||||||
|
|
||||||
open (DATA, $knownSetsFile) || die "can't open $knownSetsFile";
|
open (DATA, $knownSetsFile) || die "can't open $knownSetsFile";
|
||||||
|
@ -63,6 +64,7 @@ sub toCamelCase {
|
||||||
my $cardsFound = 0;
|
my $cardsFound = 0;
|
||||||
my $cardsImplemented = 0;
|
my $cardsImplemented = 0;
|
||||||
my $toPrint = '';
|
my $toPrint = '';
|
||||||
|
|
||||||
foreach my $card (sort cardSort @setCards) {
|
foreach my $card (sort cardSort @setCards) {
|
||||||
my $className = toCamelCase(@{$card}[0]);
|
my $className = toCamelCase(@{$card}[0]);
|
||||||
my $currentFileName = "../Mage.Sets/src/mage/sets/" . $knownSets{$setName} . "/" . $className . ".java";
|
my $currentFileName = "../Mage.Sets/src/mage/sets/" . $knownSets{$setName} . "/" . $className . ".java";
|
||||||
|
@ -73,8 +75,9 @@ foreach my $card (sort cardSort @setCards) {
|
||||||
$toPrint .= "@{$card}[2]|@{$card}[0]";
|
$toPrint .= "@{$card}[2]|@{$card}[0]";
|
||||||
$cardsImplemented++;
|
$cardsImplemented++;
|
||||||
}
|
}
|
||||||
$cardsFound = $cardsFound + 1;
|
$cardsFound++;
|
||||||
}
|
}
|
||||||
|
|
||||||
print "Number of cards found for set " . $setName . ": " . $cardsFound . "\n";
|
print "Number of cards found for set " . $setName . ": " . $cardsFound . "\n";
|
||||||
print "Number of implemented cards: " . $cardsImplemented . "\n";
|
print "Number of implemented cards: " . $cardsImplemented . "\n";
|
||||||
|
|
||||||
|
|
|
@ -73,6 +73,7 @@ foreach my $card (sort cardSort @setCards) {
|
||||||
$toPrint .= "@{$card}[2]|@{$card}[0]";
|
$toPrint .= "@{$card}[2]|@{$card}[0]";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
open CARD, "> " . lc($sets{$setName}) ."_unimplemented.txt";
|
open CARD, "> " . lc($sets{$setName}) ."_unimplemented.txt";
|
||||||
print CARD $toPrint;
|
print CARD $toPrint;
|
||||||
close CARD;
|
close CARD;
|
||||||
|
|
Loading…
Reference in a new issue