Created
August 28, 2011 08:32
-
-
Save Timberjaw/1176422 to your computer and use it in GitHub Desktop.
PAC - API Overview
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PAC | |
public void addCategory(String category); | |
public void addCard(ICard card); | |
interface ICard | |
public String getName(); | |
public String getMessage(); | |
public String getCategory(); | |
public void activate(); | |
public void deactivate(); | |
abstract class Card | |
private String name; | |
private String message; | |
private String category; | |
public Card() { | |
this("UninitializedCard", "Uninitialized card", ""); | |
} | |
public Card(String name, String message, String category) { | |
this.name = name; | |
this.message = message; | |
this.category = category; | |
} | |
public String getName( return name; } | |
public String getMessage( return message; } | |
public String getCategory( return category; } | |
abstract void activate(); | |
abstract void deactivate(); | |
class BasicCard extends Card | |
public void activate() { /* Do nothing */ } | |
public void deactivate() { /* Do nothing */ } | |
class ForestryCard extends Card | |
public ForestryCard() { | |
super("Forestry", "Plant a small forest.", "construction"); | |
} | |
public void activate() { /* Do magics here */ } | |
public void deactivate() { /* Do magics here */ } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment