rename packages lower case
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
package client;
|
||||
|
||||
import Server.*;
|
||||
import Server.Automaton.ActionResult;
|
||||
import Server.Automaton.Game;
|
||||
import Server.Cards.*;
|
||||
import server.*;
|
||||
import server.*;
|
||||
import server.automaton.ActionResult;
|
||||
import server.automaton.Game;
|
||||
import server.cards.*;
|
||||
import javafx.animation.*;
|
||||
import javafx.application.Application;
|
||||
import javafx.application.Platform;
|
||||
@@ -29,6 +30,10 @@ import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.apache.pdfbox.pdmodel.PDDocument;
|
||||
import org.apache.pdfbox.rendering.PDFRenderer;
|
||||
import server.cards.BuildingCard;
|
||||
import server.cards.Card;
|
||||
import server.cards.CharacterCard;
|
||||
import server.cards.CharacterType;
|
||||
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.io.IOException;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package client;
|
||||
|
||||
import Server.Automaton.Game;
|
||||
import Server.Player;
|
||||
import Server.TotemColor;
|
||||
import server.automaton.Game;
|
||||
import server.Player;
|
||||
import server.TotemColor;
|
||||
import javafx.application.Application;
|
||||
import javafx.embed.swing.SwingFXUtils;
|
||||
import javafx.geometry.Insets;
|
||||
|
||||
@@ -8,12 +8,12 @@ module org.example.mesosll07 {
|
||||
requires org.apache.logging.log4j;
|
||||
|
||||
opens org.example.mesosll07 to javafx.fxml;
|
||||
exports Server;
|
||||
opens Server to javafx.fxml;
|
||||
exports Server.Cards;
|
||||
opens Server.Cards to javafx.fxml;
|
||||
exports Server.Automaton;
|
||||
opens Server.Automaton to javafx.fxml;
|
||||
exports server;
|
||||
opens server to javafx.fxml;
|
||||
exports server.cards;
|
||||
opens server.cards to javafx.fxml;
|
||||
exports server.automaton;
|
||||
opens server.automaton to javafx.fxml;
|
||||
exports client;
|
||||
opens client to javafx.fxml;
|
||||
}
|
||||
@@ -1,10 +1,10 @@
|
||||
package Server;
|
||||
package server;
|
||||
|
||||
import Server.Cards.BuildingCard;
|
||||
import Server.Cards.CharacterCard;
|
||||
import Server.Cards.CharacterType;
|
||||
import Server.Cards.Trigger;
|
||||
import Server.Utils.EventsManagerException;
|
||||
import server.cards.BuildingCard;
|
||||
import server.cards.CharacterCard;
|
||||
import server.cards.CharacterType;
|
||||
import server.cards.Trigger;
|
||||
import server.utils.EventsManagerException;
|
||||
|
||||
|
||||
import java.util.ArrayList;
|
||||
@@ -1,4 +1,4 @@
|
||||
package Server;
|
||||
package server;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package Server;
|
||||
package server;
|
||||
|
||||
public enum Era {
|
||||
I,
|
||||
@@ -1,9 +1,8 @@
|
||||
package Server;
|
||||
package server;
|
||||
|
||||
import Server.Cards.Event;
|
||||
import Server.Cards.EventCard;
|
||||
import Server.Cards.Trigger;
|
||||
import Server.Utils.EventsManagerException;
|
||||
import server.cards.Event;
|
||||
import server.cards.EventCard;
|
||||
import server.utils.EventsManagerException;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@@ -1,12 +1,11 @@
|
||||
package Server;
|
||||
package server;
|
||||
|
||||
import Server.Automaton.Game;
|
||||
import Server.Cards.*;
|
||||
import server.cards.*;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import server.cards.*;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
@@ -35,7 +34,7 @@ public class GameBoard {
|
||||
|
||||
private Era era;
|
||||
|
||||
private final CardDeck cardDeck;
|
||||
private final CardDeck cardDeck;
|
||||
private final List<Card> topRow;
|
||||
private final List<Card> bottomRow;
|
||||
private final List<OfferingTile> offeringTiles;
|
||||
@@ -1,4 +1,4 @@
|
||||
package Server;
|
||||
package server;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
@@ -1,6 +1,6 @@
|
||||
package Server;
|
||||
package server;
|
||||
|
||||
import Server.Cards.CharacterCard;
|
||||
import server.cards.CharacterCard;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package Server;
|
||||
package server;
|
||||
|
||||
public enum Symbol {
|
||||
UP,
|
||||
@@ -1,4 +1,4 @@
|
||||
package Server;
|
||||
package server;
|
||||
|
||||
import javafx.scene.paint.Color;
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
package Server;
|
||||
package server;
|
||||
|
||||
import Server.Cards.BuildingCard;
|
||||
import Server.Cards.CharacterCard;
|
||||
import Server.Cards.CharacterType;
|
||||
import Server.Cards.Trigger;
|
||||
import server.cards.BuildingCard;
|
||||
import server.cards.CharacterCard;
|
||||
import server.cards.CharacterType;
|
||||
import server.cards.Trigger;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@@ -1,4 +1,4 @@
|
||||
package Server;
|
||||
package server;
|
||||
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
@@ -42,10 +42,10 @@ public class TurnTile {
|
||||
/**
|
||||
* Randomises the initial turn order. Call once during game setup.
|
||||
*/
|
||||
public void setInitialOrder(List<Player> players) {
|
||||
public void setInitialOrder(List<Player> players, boolean random) {
|
||||
|
||||
List<Player> shuffled = new ArrayList<>(players);
|
||||
Collections.shuffle(shuffled);
|
||||
if (random) Collections.shuffle(shuffled);
|
||||
for (int i = 0; i < shuffled.size(); i++) {
|
||||
positions[i] = shuffled.get(i);
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
package Server;
|
||||
package server;
|
||||
|
||||
|
||||
import java.util.List;
|
||||
@@ -1,4 +1,4 @@
|
||||
package Server.Automaton;
|
||||
package server.automaton;
|
||||
|
||||
public class ActionResult {
|
||||
private final boolean success;
|
||||
@@ -1,4 +1,4 @@
|
||||
package Server.Automaton;
|
||||
package server.automaton;
|
||||
|
||||
public class Automaton {
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
package Server.Automaton;
|
||||
package server.automaton;
|
||||
|
||||
import Server.*;
|
||||
import Server.Cards.*;
|
||||
import Server.Utils.LoadingCardsException;
|
||||
import server.*;
|
||||
import server.cards.*;
|
||||
import server.*;
|
||||
import server.cards.*;
|
||||
import server.utils.LoadingCardsException;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.util.ArrayList;
|
||||
@@ -48,7 +50,7 @@ public class Game {
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
private final List<Player> players;
|
||||
private GameBoard gameBoard;
|
||||
private GameBoard gameBoard;
|
||||
private int round;
|
||||
private GameState state;
|
||||
|
||||
@@ -106,7 +108,7 @@ public class Game {
|
||||
gameBoard.initOfferingTiles(players.size());
|
||||
gameBoard.setupInitialRows(players.size());
|
||||
|
||||
gameBoard.getTurnTile().setInitialOrder(players);
|
||||
gameBoard.getTurnTile().setInitialOrder(players, true);
|
||||
dealInitialFood();
|
||||
|
||||
round = 1;
|
||||
@@ -255,7 +257,7 @@ public class Game {
|
||||
*/
|
||||
private void filterImpossibleActions(Player player) {
|
||||
|
||||
Card ctop = gameBoard.getTopRow().stream().filter(s -> s instanceof CharacterCard || s instanceof BuildingCard).findFirst().orElse(null);
|
||||
Card ctop = gameBoard.getTopRow().stream().filter(s -> s instanceof CharacterCard || s instanceof BuildingCard).findFirst().orElse(null);
|
||||
Card cdown = gameBoard.getBottomRow().stream().filter(s -> s instanceof CharacterCard || s instanceof BuildingCard).findFirst().orElse(null);
|
||||
|
||||
boolean topEmpty = ctop == null;
|
||||
@@ -1,4 +1,4 @@
|
||||
package Server.Automaton;
|
||||
package server.automaton;
|
||||
|
||||
public enum GameState implements Comparable<GameState> {
|
||||
UNKNOWN,
|
||||
@@ -1,7 +1,7 @@
|
||||
package Server.Cards;
|
||||
package server.cards;
|
||||
|
||||
import Server.Era;
|
||||
import Server.Player;
|
||||
import server.Era;
|
||||
import server.Player;
|
||||
|
||||
public class BuildingCard extends Card{
|
||||
private final int cost;
|
||||
@@ -1,6 +1,6 @@
|
||||
package Server.Cards;
|
||||
package server.cards;
|
||||
|
||||
import Server.Era;
|
||||
import server.Era;
|
||||
|
||||
public abstract class Card {
|
||||
private final int cardId;
|
||||
@@ -1,8 +1,7 @@
|
||||
package Server.Cards;
|
||||
package server.cards;
|
||||
|
||||
import Server.Automaton.Game;
|
||||
import Server.Era;
|
||||
import Server.Utils.LoadingCardsException;
|
||||
import server.Era;
|
||||
import server.utils.LoadingCardsException;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package Server.Cards;
|
||||
package server.cards;
|
||||
|
||||
import Server.Era;
|
||||
import Server.Utils.LoadingCardsException;
|
||||
import server.Era;
|
||||
import server.utils.LoadingCardsException;
|
||||
|
||||
public class CharacterCard extends Card{
|
||||
private final CharacterType characterType;
|
||||
@@ -1,4 +1,4 @@
|
||||
package Server.Cards;
|
||||
package server.cards;
|
||||
|
||||
public enum CharacterType {
|
||||
INVENTOR,
|
||||
@@ -1,4 +1,4 @@
|
||||
package Server.Cards;
|
||||
package server.cards;
|
||||
|
||||
public enum Event {
|
||||
SUSTAINMENT,
|
||||
@@ -1,7 +1,7 @@
|
||||
package Server.Cards;
|
||||
package server.cards;
|
||||
|
||||
import Server.Era;
|
||||
import Server.Utils.LoadingCardsException;
|
||||
import server.Era;
|
||||
import server.utils.LoadingCardsException;
|
||||
|
||||
public class EventCard extends Card {
|
||||
private final Event event;
|
||||
@@ -1,4 +1,4 @@
|
||||
package Server.Cards;
|
||||
package server.cards;
|
||||
|
||||
public enum Trigger {
|
||||
FOOD_FOR_SIX,
|
||||
@@ -1,4 +1,4 @@
|
||||
package Server.Utils;
|
||||
package server.utils;
|
||||
|
||||
public class EventsManagerException extends RuntimeException {
|
||||
public EventsManagerException(String message) {
|
||||
@@ -1,4 +1,4 @@
|
||||
package Server.Utils;
|
||||
package server.utils;
|
||||
|
||||
public class GameException extends RuntimeException {
|
||||
public GameException(String message) {
|
||||
@@ -1,4 +1,4 @@
|
||||
package Server.Utils;
|
||||
package server.utils;
|
||||
|
||||
public class LoadingCardsException extends RuntimeException {
|
||||
public LoadingCardsException(String message) {
|
||||
Reference in New Issue
Block a user