diff --git a/src/com/labrisca/App.java b/src/com/labrisca/App.java index af95da5..fa148ea 100644 --- a/src/com/labrisca/App.java +++ b/src/com/labrisca/App.java @@ -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\""); } } } diff --git a/src/catalan/Card.java b/src/com/labrisca/catalan/Card.java similarity index 96% rename from src/catalan/Card.java rename to src/com/labrisca/catalan/Card.java index 8622c0a..9ed8b0e 100644 --- a/src/catalan/Card.java +++ b/src/com/labrisca/catalan/Card.java @@ -1,6 +1,6 @@ -package catalan; +package com.labrisca.catalan; -import catalan.entities.Player; +import com.labrisca.catalan.entities.Player; public class Card { // variables diff --git a/src/catalan/Color.java b/src/com/labrisca/catalan/Color.java similarity index 97% rename from src/catalan/Color.java rename to src/com/labrisca/catalan/Color.java index 91ec1aa..928e24c 100644 --- a/src/catalan/Color.java +++ b/src/com/labrisca/catalan/Color.java @@ -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; diff --git a/src/catalan/Game.java b/src/com/labrisca/catalan/Game.java similarity index 99% rename from src/catalan/Game.java rename to src/com/labrisca/catalan/Game.java index 1590176..74b58b9 100644 --- a/src/catalan/Game.java +++ b/src/com/labrisca/catalan/Game.java @@ -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; diff --git a/src/com/labrisca/entities/AI.java b/src/com/labrisca/catalan/entities/AI.java similarity index 98% rename from src/com/labrisca/entities/AI.java rename to src/com/labrisca/catalan/entities/AI.java index eaa1878..40d4fe2 100644 --- a/src/com/labrisca/entities/AI.java +++ b/src/com/labrisca/catalan/entities/AI.java @@ -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 diff --git a/src/catalan/entities/Bot.java b/src/com/labrisca/catalan/entities/Bot.java similarity index 93% rename from src/catalan/entities/Bot.java rename to src/com/labrisca/catalan/entities/Bot.java index 532390a..9e6fbe2 100644 --- a/src/catalan/entities/Bot.java +++ b/src/com/labrisca/catalan/entities/Bot.java @@ -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; diff --git a/src/catalan/entities/Human.java b/src/com/labrisca/catalan/entities/Human.java similarity index 94% rename from src/catalan/entities/Human.java rename to src/com/labrisca/catalan/entities/Human.java index 6773307..e2aaa8d 100644 --- a/src/catalan/entities/Human.java +++ b/src/com/labrisca/catalan/entities/Human.java @@ -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 diff --git a/src/catalan/entities/Player.java b/src/com/labrisca/catalan/entities/Player.java similarity index 96% rename from src/catalan/entities/Player.java rename to src/com/labrisca/catalan/entities/Player.java index 81602b0..ba9e041 100644 --- a/src/catalan/entities/Player.java +++ b/src/com/labrisca/catalan/entities/Player.java @@ -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; diff --git a/src/com/labrisca/Card.java b/src/com/labrisca/english/Card.java similarity index 96% rename from src/com/labrisca/Card.java rename to src/com/labrisca/english/Card.java index ec40f82..c479279 100644 --- a/src/com/labrisca/Card.java +++ b/src/com/labrisca/english/Card.java @@ -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 diff --git a/src/com/labrisca/Color.java b/src/com/labrisca/english/Color.java similarity index 97% rename from src/com/labrisca/Color.java rename to src/com/labrisca/english/Color.java index b7eac20..f7c1213 100644 --- a/src/com/labrisca/Color.java +++ b/src/com/labrisca/english/Color.java @@ -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; diff --git a/src/com/labrisca/Game.java b/src/com/labrisca/english/Game.java similarity index 99% rename from src/com/labrisca/Game.java rename to src/com/labrisca/english/Game.java index 5ea4f11..f0cc396 100644 --- a/src/com/labrisca/Game.java +++ b/src/com/labrisca/english/Game.java @@ -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; diff --git a/src/catalan/entities/AI.java b/src/com/labrisca/english/entities/AI.java similarity index 98% rename from src/catalan/entities/AI.java rename to src/com/labrisca/english/entities/AI.java index 62e7268..5fca47e 100644 --- a/src/catalan/entities/AI.java +++ b/src/com/labrisca/english/entities/AI.java @@ -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 diff --git a/src/com/labrisca/entities/Bot.java b/src/com/labrisca/english/entities/Bot.java similarity index 93% rename from src/com/labrisca/entities/Bot.java rename to src/com/labrisca/english/entities/Bot.java index 4fe5680..66c9b8b 100644 --- a/src/com/labrisca/entities/Bot.java +++ b/src/com/labrisca/english/entities/Bot.java @@ -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; diff --git a/src/com/labrisca/entities/Human.java b/src/com/labrisca/english/entities/Human.java similarity index 94% rename from src/com/labrisca/entities/Human.java rename to src/com/labrisca/english/entities/Human.java index 4eef29b..c41b5df 100644 --- a/src/com/labrisca/entities/Human.java +++ b/src/com/labrisca/english/entities/Human.java @@ -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 diff --git a/src/com/labrisca/entities/Player.java b/src/com/labrisca/english/entities/Player.java similarity index 95% rename from src/com/labrisca/entities/Player.java rename to src/com/labrisca/english/entities/Player.java index a5a1404..37108d8 100644 --- a/src/com/labrisca/entities/Player.java +++ b/src/com/labrisca/english/entities/Player.java @@ -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;