Commit 55a28d92 authored by 9731301's avatar 9731301

Add Initial Classes

parents
Pipeline #3808 failed with stages
public abstract class Card {
private int score;
public int getScore() {
return score;
}
public void setScore(int score) {
this.score = score;
}
}
public class ColoredCard extends Card {
public ColoredCard(String color , int score) {
this.color = color;
setScore(score);
}
private String color;
public String getColor() {
return color;
}
public void setColor(String color) {
this.color = color;
}
}
public class Draw2Card extends MotiveCard {
@Override
public void move() {
}
}
public abstract class MotiveCard extends ColoredCard{
public abstract void move();
}
\ No newline at end of file
public class NumericalCard extends ColoredCard {
private int number;
public NumericalCard(String color, int score, int number) {
super(color, score);
this.number = number;
}
}
public class ReverseCard extends MotiveCard {
@Override
public void move() {
}
}
public class SkipCard extends MotiveCard {
@Override
public void move() {
}
}
import java.util.ArrayList;
public class User {
private String name;
private int sore;
private ArrayList<Card> userCards;
public User(){
userCards = new ArrayList<>();
}
public void addCard(Card card){
userCards.add(card);
}
public void removeCard(Card card){
userCards.remove(card);
}
}
public class Wild4 extends WildCard {
@Override
public void giveCard() {
}
}
public abstract class WildCard extends Card {
public abstract void giveCard();
}
public class WildColor extends WildCard {
@Override
public void giveCard() {
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment