Skip to content

Commit

Permalink
moving packages
Browse files Browse the repository at this point in the history
  • Loading branch information
ericmp33 committed Aug 29, 2021
1 parent af6098a commit c3744c6
Show file tree
Hide file tree
Showing 15 changed files with 54 additions and 59 deletions.
29 changes: 12 additions & 17 deletions src/com/labrisca/App.java
Original file line number Diff line number Diff line change
@@ -1,39 +1,34 @@
package com.labrisca;

import com.labrisca.entities.Bot;
import com.labrisca.entities.Human;
import com.labrisca.entities.Player;
import java.util.Scanner;

public class App {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
System.out.println("Choose language: Catalan or English");
var sc = Game.getSc();
while (true) {
System.out.print("> ");
String input = sc.nextLine().trim().toLowerCase();

// initialize game, players and run game
if (input.equals("catalan")) {
System.out.println();

// initialize game, players and run game
catalan.Game game = new catalan.Game();
catalan.entities.Player jug = new catalan.entities.Human("@ericmp33", game);
catalan.entities.Player bot = new catalan.entities.Bot(game);
var game = new com.labrisca.catalan.Game();
var jug = new com.labrisca.catalan.entities.Human("@ericmp33", game);
var bot = new com.labrisca.catalan.entities.Bot(game);

System.out.println();
game.run(jug, bot);
break;
} else if (input.equals("english")) {
System.out.println();

// initialize game, players and run game
Game game = new Game();
Player jug = new Human("@ericmp33", game);
Player bot = new Bot(game);
var game = new com.labrisca.english.Game();
var jug = new com.labrisca.english.entities.Human("@ericmp33", game);
var bot = new com.labrisca.english.entities.Bot(game);

System.out.println();
game.run(jug, bot);
break;
}
System.out.println("Type \"catalan\" or \"english\"");
System.out.println("Type \"Catalan\" or \"English\"");
}
}
}
4 changes: 2 additions & 2 deletions src/catalan/Card.java → src/com/labrisca/catalan/Card.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package catalan;
package com.labrisca.catalan;

import catalan.entities.Player;
import com.labrisca.catalan.entities.Player;

public class Card {
// variables
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package catalan;
package com.labrisca.catalan;

import catalan.entities.Player;
import com.labrisca.catalan.entities.Player;

import java.util.concurrent.ThreadLocalRandom;

Expand Down
4 changes: 2 additions & 2 deletions src/catalan/Game.java → src/com/labrisca/catalan/Game.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package catalan;
package com.labrisca.catalan;

import catalan.entities.Player;
import com.labrisca.catalan.entities.Player;

import java.util.ArrayList;
import java.util.Collections;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.labrisca.entities;
package com.labrisca.catalan.entities;

import com.labrisca.Card;
import com.labrisca.Game;
import com.labrisca.catalan.Card;
import com.labrisca.catalan.Game;

public class AI {
// variables
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package catalan.entities;
package com.labrisca.catalan.entities;

import catalan.Card;
import catalan.Color;
import catalan.Game;
import com.labrisca.catalan.Card;
import com.labrisca.catalan.Color;
import com.labrisca.catalan.Game;

import java.util.concurrent.ThreadLocalRandom;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package catalan.entities;
package com.labrisca.catalan.entities;

import catalan.Card;
import catalan.Color;
import catalan.Game;
import com.labrisca.catalan.Card;
import com.labrisca.catalan.Color;
import com.labrisca.catalan.Game;

public class Human extends Player {
// constructor
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package catalan.entities;
package com.labrisca.catalan.entities;

import catalan.Card;
import catalan.Color;
import catalan.Game;
import com.labrisca.catalan.Card;
import com.labrisca.catalan.Color;
import com.labrisca.catalan.Game;

import java.util.ArrayList;
import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.labrisca;
package com.labrisca.english;

import com.labrisca.entities.Player;
import com.labrisca.english.entities.Player;

public class Card {
// variables
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.labrisca;
package com.labrisca.english;

import com.labrisca.entities.Player;
import com.labrisca.english.entities.Player;

import java.util.concurrent.ThreadLocalRandom;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.labrisca;
package com.labrisca.english;

import com.labrisca.entities.Player;
import com.labrisca.english.entities.Player;

import java.util.ArrayList;
import java.util.Collections;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package catalan.entities;
package com.labrisca.english.entities;

import catalan.Card;
import catalan.Game;
import com.labrisca.english.Card;
import com.labrisca.english.Game;

public class AI {
// variables
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.labrisca.entities;
package com.labrisca.english.entities;

import com.labrisca.Card;
import com.labrisca.Color;
import com.labrisca.Game;
import com.labrisca.english.Card;
import com.labrisca.english.Color;
import com.labrisca.english.Game;

import java.util.concurrent.ThreadLocalRandom;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.labrisca.entities;
package com.labrisca.english.entities;

import com.labrisca.Card;
import com.labrisca.Color;
import com.labrisca.Game;
import com.labrisca.english.Card;
import com.labrisca.english.Color;
import com.labrisca.english.Game;

public class Human extends Player {
// constructor
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.labrisca.entities;
package com.labrisca.english.entities;

import com.labrisca.Card;
import com.labrisca.Color;
import com.labrisca.Game;
import com.labrisca.english.Card;
import com.labrisca.english.Color;
import com.labrisca.english.Game;

import java.util.ArrayList;
import java.util.List;
Expand Down

0 comments on commit c3744c6

Please sign in to comment.