mirror of
https://github.com/correl/mage.git
synced 2024-11-24 19:19:56 +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) {
|
||||
push(@setCards, \@data);
|
||||
}
|
||||
}
|
||||
close(DATA);
|
||||
|
||||
open (DATA, $knownSetsFile) || die "can't open $knownSetsFile";
|
||||
|
@ -63,6 +64,7 @@ sub toCamelCase {
|
|||
my $cardsFound = 0;
|
||||
my $cardsImplemented = 0;
|
||||
my $toPrint = '';
|
||||
|
||||
foreach my $card (sort cardSort @setCards) {
|
||||
my $className = toCamelCase(@{$card}[0]);
|
||||
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]";
|
||||
$cardsImplemented++;
|
||||
}
|
||||
$cardsFound = $cardsFound + 1;
|
||||
$cardsFound++;
|
||||
}
|
||||
|
||||
print "Number of cards found for set " . $setName . ": " . $cardsFound . "\n";
|
||||
print "Number of implemented cards: " . $cardsImplemented . "\n";
|
||||
|
||||
|
|
|
@ -73,6 +73,7 @@ foreach my $card (sort cardSort @setCards) {
|
|||
$toPrint .= "@{$card}[2]|@{$card}[0]";
|
||||
}
|
||||
}
|
||||
|
||||
open CARD, "> " . lc($sets{$setName}) ."_unimplemented.txt";
|
||||
print CARD $toPrint;
|
||||
close CARD;
|
||||
|
|
Loading…
Reference in a new issue