Skip to content

Commit

Permalink
final commit --
Browse files Browse the repository at this point in the history
  • Loading branch information
ArmanZarei committed May 6, 2019
1 parent 99c9c4a commit 65d34cf
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
18 changes: 9 additions & 9 deletions src/Modules/Game.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,15 @@ public class Game {
//////////////////////////// End ARMAN ////////////////////////////////

public Game(Player player1, Player player2, String gameMode){
for(int j = 0 ; j < 2 ; j++){
for(int i = 0 ; i < getDecksOfPLayers()[j].size() ; i++){
if(getDecksOfPLayers()[j].get(i) instanceof Item) {
mainItem[j] = (Item) getDecksOfPLayers()[j].get(i);
getDecksOfPLayers()[j].remove(i);
break;
}
}
}
// for(int j = 0 ; j < 2 ; j++){
// for(int i = 0 ; i < getDecksOfPLayers()[j].size() ; i++){
// if(getDecksOfPLayers()[j].get(i) instanceof Item) {
// mainItem[j] = (Item) getDecksOfPLayers()[j].get(i);
// getDecksOfPLayers()[j].remove(i);
// break;
// }
// }
// }
playersOfGame = new Player[2];
playersOfGame[0] = player1;
playersOfGame[1] = player2;
Expand Down
6 changes: 3 additions & 3 deletions src/Modules/Shop.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public Shop(){
for (File file : listOfFiles)
for (int i = 0; i < 10; i++) {
Unit unit = CardBuilder.loadAUnitFromJsonFile(file.getName().substring(0,file.getName().length()-5));
unit.setCardID(unit.getCardID() * 10 + i);
unit.setCardID(unit.getCardID() * 100 + i);
if ( unit.getSpecialPower() == null )
unit.setSpecialPower(new Spell("default"));
unit.setTypeOfCard(0);
Expand All @@ -35,7 +35,7 @@ public Shop(){
for (File file : listOfFiles)
for (int i = 0; i < 10; i++) {
SpellCard spell = CardBuilder.loadASpellCardFromJsonFile(file.getName().substring(0,file.getName().length()-5));
spell.setCardID(spell.getCardID() * 10 + i);
spell.setCardID(spell.getCardID() * 100 + i);
spell.setTypeOfCard(1);
cards.add(spell);
}
Expand All @@ -44,7 +44,7 @@ public Shop(){
for (File file : listOfFiles)
for (int i = 0; i < 10; i++) {
Item item = CardBuilder.loadAnItemFromJsonFile(file.getName().substring(0,file.getName().length()-5), 0);
item.setCardID(item.getCardID() * 10 + i);
item.setCardID(item.getCardID() * 100 + i);
item.setTypeOfCard(2);
cards.add(item);
}
Expand Down

0 comments on commit 65d34cf

Please sign in to comment.