Fixed bug in Perl script.

This commit is contained in:
LevelX2 2014-02-19 19:48:33 +01:00
parent 39e51cbf6c
commit 11618e64ba
2 changed files with 5 additions and 1 deletions

View file

@ -28,6 +28,7 @@ while(my $line = <DATA>) {
my @data = split('\\|', $line);
if ($data[1] eq $setName) {
push(@setCards, \@data);
}
}
close(DATA);
@ -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";

View file

@ -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;