-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
54 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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\""); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
src/com/labrisca/entities/AI.java → src/com/labrisca/catalan/entities/AI.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 4 additions & 4 deletions
8
src/catalan/entities/Bot.java → src/com/labrisca/catalan/entities/Bot.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 4 additions & 4 deletions
8
src/catalan/entities/Human.java → src/com/labrisca/catalan/entities/Human.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 4 additions & 4 deletions
8
src/catalan/entities/Player.java → ...com/labrisca/catalan/entities/Player.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
src/com/labrisca/Card.java → src/com/labrisca/english/Card.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
src/com/labrisca/Color.java → src/com/labrisca/english/Color.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
src/com/labrisca/Game.java → src/com/labrisca/english/Game.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
src/catalan/entities/AI.java → src/com/labrisca/english/entities/AI.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 4 additions & 4 deletions
8
src/com/labrisca/entities/Bot.java → src/com/labrisca/english/entities/Bot.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 4 additions & 4 deletions
8
src/com/labrisca/entities/Human.java → src/com/labrisca/english/entities/Human.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 4 additions & 4 deletions
8
src/com/labrisca/entities/Player.java → ...com/labrisca/english/entities/Player.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters