Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

6 entity opportunity card 1 #25

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 0 additions & 20 deletions src/main/java/tutorial/ChanceCard.java
Original file line number Diff line number Diff line change
@@ -1,31 +1,11 @@
package tutorial;

import java.util.ArrayList;
import java.util.Random;

public class ChanceCard extends OpportunityCard {

int moneychange;
int movement;
String cardname;

//public ChanceCard() {
// super();
// chancecard = new ArrayList<String>();
// chancecard.add("Get Out of Jail Free.");
// chancecard.add("Go to Jail.");
//set up cards in chance card deck
//}

//public String getCard(String cardtype) {
// Random rand = new Random();
// int upperbound = chancecard.size();
// int int_random = rand.nextInt(upperbound);
//generate a random int from 0 to the length of chancecard - 1
// return chancecard.get(int_random);
//return the card at index of the random int
//}

public ChanceCard(String cardname, int moneyamount, int displacement) {
super();
this.cardname = cardname;
Expand Down
3 changes: 0 additions & 3 deletions src/main/java/tutorial/CommunityCard.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
package tutorial;

import java.util.ArrayList;
import java.util.Random;

public class CommunityCard extends OpportunityCard{
int moneychange;
int movement;
Expand Down
8 changes: 8 additions & 0 deletions src/main/java/tutorial/Deck.java
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,12 @@ public boolean updateDeck(String cardtype) { // remove "get out of jail" from de
return false;
}
// cardtype should only be either "community" or "chance".

public void addCommunityCard(CommunityCard card) {
communitycardlist.add(card);
}

public void addChanceCard(ChanceCard card) {
chancecardlist.add(card);
}
}
2 changes: 0 additions & 2 deletions src/main/java/tutorial/OpportunityCard.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package tutorial;

import java.util.ArrayList;

abstract class OpportunityCard {
String cardname;
int moneychange;
Expand Down