some small tweaks for CardList operations in some source files

This commit is contained in:
jendave
2011-08-07 01:49:52 +00:00
parent 439679044d
commit 33e3d92c9a
3 changed files with 7 additions and 7 deletions

View File

@@ -86,7 +86,7 @@ public class ReadBoosterPack implements NewConstants {
public CardList getBoosterPack5() { public CardList getBoosterPack5() {
CardList list = new CardList(); CardList list = new CardList();
for(int i = 0; i < 5; i++) for(int i = 0; i < 5; i++)
list.addAll(getBoosterPack().toArray()); list.addAll(getBoosterPack());
for(int i = 0; i < 20; i++) { for(int i = 0; i < 20; i++) {
list.add(AllZone.CardFactory.getCard("Forest", AllZone.HumanPlayer)); list.add(AllZone.CardFactory.getCard("Forest", AllZone.HumanPlayer));
@@ -360,7 +360,7 @@ public class ReadBoosterPack
{ {
CardList list = new CardList(); CardList list = new CardList();
for(int i = 0; i < 5; i++) for(int i = 0; i < 5; i++)
list.addAll(getBoosterPack().toArray()); list.addAll(getBoosterPack());
for(int i = 0; i < 40; i++) for(int i = 0; i < 40; i++)
{ {

View File

@@ -53,7 +53,7 @@ public class ReadDraftBoosterPack implements NewConstants {
public CardList getBoosterPack5() { public CardList getBoosterPack5() {
CardList list = new CardList(); CardList list = new CardList();
for(int i = 0; i < 5; i++) for(int i = 0; i < 5; i++)
list.addAll(getBoosterPack().toArray()); list.addAll(getBoosterPack());
for(int i = 0; i < 20; i++) { for(int i = 0; i < 20; i++) {
list.add(AllZone.CardFactory.getCard("Forest", AllZone.HumanPlayer)); list.add(AllZone.CardFactory.getCard("Forest", AllZone.HumanPlayer));

View File

@@ -114,8 +114,8 @@ class TableModel extends AbstractTableModel {
public CardList getCards() { public CardList getCards() {
CardList all = new CardList(); CardList all = new CardList();
all.addAll(dataCopies.toArray()); all.addAll(dataCopies);
all.addAll(dataNoCopies.toArray()); all.addAll(dataNoCopies);
return all; return all;
} }
@@ -313,8 +313,8 @@ class TableModel extends AbstractTableModel {
recentAscending = ascending; recentAscending = ascending;
CardList all = new CardList(); CardList all = new CardList();
all.addAll(dataNoCopies.toArray()); all.addAll(dataNoCopies);
all.addAll(dataCopies.toArray()); all.addAll(dataCopies);
TableSorter sorter = new TableSorter(all, column, ascending, true); TableSorter sorter = new TableSorter(all, column, ascending, true);
Card[] array = all.toArray(); Card[] array = all.toArray();