mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 02:38:02 +00:00
This commit is contained in:
27
src/BoosterPack.java
Normal file
27
src/BoosterPack.java
Normal file
@@ -0,0 +1,27 @@
|
||||
|
||||
|
||||
public class BoosterPack
|
||||
{
|
||||
public static CardList getBoosterPack(int number)
|
||||
{
|
||||
CardList all = new CardList();
|
||||
for(int i = 0; i < number; i++)
|
||||
all.addAll(getBoosterPack().toArray());
|
||||
|
||||
return all;
|
||||
}
|
||||
|
||||
public static CardList getBoosterPack()
|
||||
{
|
||||
CardList all = AllZone.CardFactory.getAllCards();
|
||||
CardList pack = new CardList();
|
||||
|
||||
for(int i = 0; i < 10; i++)
|
||||
pack.add(all.get(MyRandom.random.nextInt(all.size())));
|
||||
|
||||
for(int i = 0; i < 5; i++)
|
||||
pack.add(AllZone.CardFactory.copyCard(pack.get(i)));
|
||||
|
||||
return pack;
|
||||
}//getBoosterPack()
|
||||
}
|
||||
Reference in New Issue
Block a user