From 7d3f8acf5260bf0d5458d258111e05a05859e535 Mon Sep 17 00:00:00 2001 From: Eduardo Pedroni Date: Sun, 12 Jul 2015 21:00:53 +0200 Subject: Started fiddling with decks --- src/eu/equalparts/cardbase/data/Card.java | 28 ++++++++++++++++++++++++++++ src/eu/equalparts/cardbase/data/Deck.java | 14 +++++++------- 2 files changed, 35 insertions(+), 7 deletions(-) (limited to 'src/eu/equalparts/cardbase/data') diff --git a/src/eu/equalparts/cardbase/data/Card.java b/src/eu/equalparts/cardbase/data/Card.java index e2ad3f0..8ac5cd1 100644 --- a/src/eu/equalparts/cardbase/data/Card.java +++ b/src/eu/equalparts/cardbase/data/Card.java @@ -32,4 +32,32 @@ public class Card { public String imageCode; public Integer count; + @Override + public Card clone() { + Card clone = new Card(); + + clone.name = this.name; + clone.layout = this.layout; + clone.manaCost = this.manaCost; + clone.cmc = this.cmc; + clone.type = this.type; + clone.rarity = this.rarity; + clone.text = this.text; + clone.flavor = this.flavor; + clone.artist = this.artist; + clone.number = this.number; + clone.power = this.power; + clone.toughness = this.toughness; + clone.loyalty = this.loyalty; + clone.multiverseid = this.multiverseid; + clone.imageName = this.imageName; + clone.border = this.border; + clone.watermark = this.watermark; + clone.setCode = this.setCode; + clone.imageCode = this.imageCode; + clone.count = this.count; + + return clone; + } + } \ No newline at end of file diff --git a/src/eu/equalparts/cardbase/data/Deck.java b/src/eu/equalparts/cardbase/data/Deck.java index 8a9ed12..6a6658a 100644 --- a/src/eu/equalparts/cardbase/data/Deck.java +++ b/src/eu/equalparts/cardbase/data/Deck.java @@ -1,12 +1,12 @@ package eu.equalparts.cardbase.data; -import java.util.HashMap; +public abstract class Deck { -public class Deck { - - /** - * Cards stored in key-value pairs of [multiverse ID, amount]. - */ - public HashMap cards; + public String name = "Unnamed Deck"; + public int plains = 0, + islands = 0, + swamps = 0, + mountains = 0, + forests = 0; } -- cgit v1.2.3