aboutsummaryrefslogtreecommitdiffstats
path: root/src/eu/equalparts/cardbase/data/Cardbase.java
blob: 1c2aa12003eb6e48efdf41d439ac75faa5c8b5ed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
package eu.equalparts.cardbase.data;

import java.util.ArrayList;

public class Cardbase {

	public ArrayList<Card> cards = new ArrayList<>();
	public ArrayList<Deck> decks = new ArrayList<>();
	
	/**
	 * @param setCode
	 * @param number 
	 * @return the card if found, else null.
	 */
	public Card getCardByNumber(String setCode, String number) {
		for (Card card : cards) {
			if (card.setCode.equals(setCode) && card.number.equals(number))
				return card;
		}
		
		return null;
	}
	
}