Skip to content

Commit

Permalink
Refactor according to package name rules
Browse files Browse the repository at this point in the history
  • Loading branch information
voroscsoki committed May 22, 2024
1 parent e83917f commit 5824aa4
Show file tree
Hide file tree
Showing 32 changed files with 142 additions and 129 deletions.
7 changes: 4 additions & 3 deletions src/main/java/Drawing/CisternDraw.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
package main.java.Drawing;

import main.java.Controll.ViewGame;
package main.java.drawing;

import javax.swing.*;

import main.java.control.ViewGame;

import java.awt.*;

/**
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/Drawing/Drawable.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package main.java.Drawing;
package main.java.drawing;

import javax.swing.*;
import java.awt.*;
Expand Down
20 changes: 10 additions & 10 deletions src/main/java/Drawing/MechanicDraw.java
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
package main.java.Drawing;
package main.java.drawing;

import main.java.Controll.Controller;
import main.java.Controll.ViewGame;
import main.java.Fields.ActiveFields.Cistern;
import main.java.Fields.ActiveFields.Pump;
import main.java.Fields.ActiveFields.Spring;
import main.java.Fields.Field;
import main.java.Fields.Pipe;
import main.java.Players.Mechanic;
import main.java.Players.Player;
import main.java.control.Controller;
import main.java.control.ViewGame;
import main.java.fields.Field;
import main.java.fields.Pipe;
import main.java.fields.activefields.Cistern;
import main.java.fields.activefields.Pump;
import main.java.fields.activefields.Spring;
import main.java.players.Mechanic;
import main.java.players.Player;

import javax.swing.*;
import java.awt.*;
Expand Down
7 changes: 4 additions & 3 deletions src/main/java/Drawing/PipeDraw.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
package main.java.Drawing;

import main.java.Controll.ViewGame;
package main.java.drawing;

import javax.swing.*;

import main.java.control.ViewGame;

import java.awt.*;

/**
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/Drawing/PumpDraw.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package main.java.Drawing;
package main.java.drawing;

import main.java.Controll.ViewGame;
import main.java.Fields.ActiveFields.Pump;
import main.java.control.ViewGame;
import main.java.fields.activefields.Pump;

import javax.swing.*;
import java.awt.*;
Expand Down
20 changes: 10 additions & 10 deletions src/main/java/Drawing/SaboteurDraw.java
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
package main.java.Drawing;
package main.java.drawing;

import main.java.Controll.Controller;
import main.java.Controll.ViewGame;
import main.java.Fields.ActiveFields.Cistern;
import main.java.Fields.ActiveFields.Pump;
import main.java.Fields.ActiveFields.Spring;
import main.java.Fields.Field;
import main.java.Fields.Pipe;
import main.java.Players.Player;
import main.java.Players.Saboteur;
import main.java.control.Controller;
import main.java.control.ViewGame;
import main.java.fields.Field;
import main.java.fields.Pipe;
import main.java.fields.activefields.Cistern;
import main.java.fields.activefields.Pump;
import main.java.fields.activefields.Spring;
import main.java.players.Player;
import main.java.players.Saboteur;

import javax.swing.*;
import java.awt.*;
Expand Down
7 changes: 4 additions & 3 deletions src/main/java/Drawing/SpringDraw.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
package main.java.Drawing;

import main.java.Controll.ViewGame;
package main.java.drawing;

import javax.swing.*;

import main.java.control.ViewGame;

import java.awt.*;

public class SpringDraw extends Drawable {
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/Enums/Fluid.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package main.java.Enums;
package main.java.enums;

public enum Fluid {
DRY, STICKY, SLIPPERY
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/Fields/ActiveFields/ActiveFields.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package main.java.Fields.ActiveFields;
package main.java.fields.activefields;

import main.java.Fields.Field;
import main.java.Fields.Pipe;
import main.java.Players.Player;
import main.java.fields.Field;
import main.java.fields.Pipe;
import main.java.players.Player;

import java.util.ArrayList;

Expand Down
10 changes: 5 additions & 5 deletions src/main/java/Fields/ActiveFields/Cistern.java
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package main.java.Fields.ActiveFields;
package main.java.fields.activefields;

import main.java.Controll.Controller;
import main.java.Fields.Pipe;
import main.java.Players.Player;
import main.java.StringResource.StringResourceController;
import main.java.control.Controller;
import main.java.fields.Pipe;
import main.java.players.Player;
import main.java.stringresource.StringResourceController;

import java.util.ArrayList;
import java.util.Random;
Expand Down
10 changes: 5 additions & 5 deletions src/main/java/Fields/ActiveFields/Pump.java
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package main.java.Fields.ActiveFields;
package main.java.fields.activefields;

import main.java.Controll.Controller;
import main.java.Fields.Pipe;
import main.java.Players.Player;
import main.java.StringResource.StringResourceController;
import main.java.control.Controller;
import main.java.fields.Pipe;
import main.java.players.Player;
import main.java.stringresource.StringResourceController;

import java.util.ArrayList;
import java.util.Random;
Expand Down
10 changes: 5 additions & 5 deletions src/main/java/Fields/ActiveFields/Spring.java
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package main.java.Fields.ActiveFields;
package main.java.fields.activefields;

import main.java.Controll.Controller;
import main.java.Fields.Pipe;
import main.java.Players.Player;
import main.java.StringResource.StringResourceController;
import main.java.control.Controller;
import main.java.fields.Pipe;
import main.java.players.Player;
import main.java.stringresource.StringResourceController;

import java.util.ArrayList;

Expand Down
10 changes: 5 additions & 5 deletions src/main/java/Fields/Field.java
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package main.java.Fields;
package main.java.fields;

import main.java.Fields.ActiveFields.ActiveFields;
import main.java.Fields.ActiveFields.Pump;
import main.java.Interfaces.Steppable;
import main.java.Players.Player;
import main.java.fields.activefields.ActiveFields;
import main.java.fields.activefields.Pump;
import main.java.interfaces.Steppable;
import main.java.players.Player;

import java.util.ArrayList;

Expand Down
14 changes: 7 additions & 7 deletions src/main/java/Fields/Pipe.java
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package main.java.Fields;
package main.java.fields;

import main.java.Controll.Controller;
import main.java.Enums.Fluid;
import main.java.Fields.ActiveFields.ActiveFields;
import main.java.Fields.ActiveFields.Pump;
import main.java.Players.Player;
import main.java.StringResource.StringResourceController;
import main.java.control.Controller;
import main.java.enums.Fluid;
import main.java.fields.activefields.ActiveFields;
import main.java.fields.activefields.Pump;
import main.java.players.Player;
import main.java.stringresource.StringResourceController;

import java.util.ArrayList;
import java.util.List;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/Interfaces/Steppable.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package main.java.Interfaces;
package main.java.interfaces;

/**
* Steppable interface.
Expand Down
10 changes: 5 additions & 5 deletions src/main/java/Players/Mechanic.java
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package main.java.Players;
package main.java.players;

import main.java.Controll.Controller;
import main.java.Fields.ActiveFields.ActiveFields;
import main.java.Fields.ActiveFields.Pump;
import main.java.Fields.Pipe;
import main.java.control.Controller;
import main.java.fields.Pipe;
import main.java.fields.activefields.ActiveFields;
import main.java.fields.activefields.Pump;


/**
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/Players/Player.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package main.java.Players;
package main.java.players;

import main.java.Fields.ActiveFields.Pump;
import main.java.Fields.Field;
import main.java.Fields.Pipe;
import main.java.fields.Field;
import main.java.fields.Pipe;
import main.java.fields.activefields.Pump;

/**
* Abstract class for the players.
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/Players/Saboteur.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package main.java.Players;
package main.java.players;

import main.java.Controll.Controller;
import main.java.control.Controller;


/**
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/StringResource/StringResourceController.java
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package main.java.StringResource;

import main.java.Controll.Controller;
package main.java.stringresource;

import java.util.List;

import main.java.control.Controller;

public final class StringResourceController {
private StringResourceController(){}
public static final String FALSE = "false";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
package main.java.Controll;

import main.java.Drawing.*;
import main.java.Enums.Fluid;
import main.java.Fields.ActiveFields.ActiveFields;
import main.java.Fields.ActiveFields.Cistern;
import main.java.Fields.ActiveFields.Pump;
import main.java.Fields.ActiveFields.Spring;
import main.java.Fields.Field;
import main.java.Fields.Pipe;
import main.java.Interfaces.Steppable;
import main.java.Players.Mechanic;
import main.java.Players.Player;
import main.java.Players.Saboteur;
import main.java.StringResource.StringResourceController;
package main.java.control;

import main.java.drawing.*;
import main.java.enums.Fluid;
import main.java.fields.Field;
import main.java.fields.Pipe;
import main.java.fields.activefields.ActiveFields;
import main.java.fields.activefields.Cistern;
import main.java.fields.activefields.Pump;
import main.java.fields.activefields.Spring;
import main.java.interfaces.Steppable;
import main.java.players.Mechanic;
import main.java.players.Player;
import main.java.players.Saboteur;
import main.java.stringresource.StringResourceController;

import java.io.*;
import java.nio.file.Path;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package main.java.Controll;
package main.java.control;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package main.java.Controll;
package main.java.control;

import main.java.Drawing.Drawable;
import main.java.Drawing.PipeDraw;
import main.java.Enums.Fluid;
import main.java.Fields.Pipe;
import main.java.drawing.Drawable;
import main.java.drawing.PipeDraw;
import main.java.enums.Fluid;
import main.java.fields.Pipe;

import javax.swing.*;
import java.awt.*;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package main.java.Controll;

import main.java.Fields.ActiveFields.Cistern;
import main.java.Fields.Pipe;
package main.java.control;

import java.util.ArrayList;

import main.java.fields.Pipe;
import main.java.fields.activefields.Cistern;

import static java.lang.Math.abs;

/**
Expand Down
5 changes: 3 additions & 2 deletions test/main/java/Controll/WaterCounterTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;

import main.java.Fields.Pipe;
import main.java.Fields.ActiveFields.Cistern;
import main.java.control.WaterCounter;
import main.java.fields.Pipe;
import main.java.fields.activefields.Cistern;

class WaterCounterTest {
private WaterCounter waterCounter;
Expand Down
4 changes: 3 additions & 1 deletion test/main/java/Fields/ActiveFields/CisternTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;

import main.java.Fields.Pipe;
import main.java.fields.Pipe;
import main.java.fields.activefields.Cistern;
import main.java.fields.activefields.Pump;

class CisternTest {
private Cistern cistern;
Expand Down
3 changes: 2 additions & 1 deletion test/main/java/Fields/ActiveFields/PumpTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;

import main.java.Fields.Pipe;
import main.java.fields.Pipe;
import main.java.fields.activefields.Pump;

class PumpTest {
private Pump pump;
Expand Down
5 changes: 3 additions & 2 deletions test/main/java/Fields/ActiveFields/SpringTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;

import main.java.Fields.Pipe;
import main.java.Players.Mechanic;
import main.java.fields.Pipe;
import main.java.fields.activefields.Spring;
import main.java.players.Mechanic;

class SpringTest {
private Spring spring;
Expand Down
14 changes: 8 additions & 6 deletions test/main/java/Fields/PipeTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,14 @@
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;

import main.java.Controll.Controller;
import main.java.Enums.Fluid;
import main.java.Fields.ActiveFields.ActiveFields;
import main.java.Fields.ActiveFields.Pump;
import main.java.Players.Mechanic;
import main.java.Players.Player;
import main.java.control.Controller;
import main.java.enums.Fluid;
import main.java.fields.Field;
import main.java.fields.Pipe;
import main.java.fields.activefields.ActiveFields;
import main.java.fields.activefields.Pump;
import main.java.players.Mechanic;
import main.java.players.Player;

class PipeTest {
private Pipe pipe;
Expand Down
Loading

0 comments on commit 5824aa4

Please sign in to comment.