change project structure

This commit is contained in:
2025-04-05 10:18:02 +02:00
parent a0af8caf57
commit 9af06e36f8
25 changed files with 57 additions and 56 deletions

View File

@@ -3,11 +3,11 @@
*/ */
package chess; package chess;
import chess.io.CommandExecutor; import chess.controller.CommandExecutor;
import chess.io.commands.NewGameCommand; import chess.controller.commands.NewGameCommand;
import chess.model.ChessBoard; import chess.model.ChessBoard;
import chess.model.Game; import chess.model.Game;
import chess.simplerender.Window; import chess.view.simplerender.Window;
public class App { public class App {
public static void main(String[] args) { public static void main(String[] args) {

View File

@@ -1,4 +1,4 @@
package chess.io; package chess.controller;
import chess.model.Game; import chess.model.Game;

View File

@@ -1,6 +1,6 @@
package chess.io; package chess.controller;
import chess.io.Command.CommandResult; import chess.controller.Command.CommandResult;
import chess.model.Game; import chess.model.Game;
import chess.model.Game.GameStatus; import chess.model.Game.GameStatus;

View File

@@ -1,4 +1,4 @@
package chess.io; package chess.controller;
import chess.model.Color; import chess.model.Color;
import chess.model.Coordinate; import chess.model.Coordinate;

View File

@@ -1,4 +1,4 @@
package chess.io; package chess.controller;
import chess.model.Game; import chess.model.Game;

View File

@@ -1,7 +1,7 @@
package chess.io.commands; package chess.controller.commands;
import chess.io.OutputSystem; import chess.controller.OutputSystem;
import chess.io.PlayerCommand; import chess.controller.PlayerCommand;
import chess.model.Game; import chess.model.Game;
public class CastlingCommand extends PlayerCommand { public class CastlingCommand extends PlayerCommand {

View File

@@ -1,10 +1,10 @@
package chess.io.commands; package chess.controller.commands;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import chess.io.Command; import chess.controller.Command;
import chess.io.OutputSystem; import chess.controller.OutputSystem;
import chess.model.ChessBoard; import chess.model.ChessBoard;
import chess.model.Coordinate; import chess.model.Coordinate;
import chess.model.Game; import chess.model.Game;

View File

@@ -1,7 +1,7 @@
package chess.io.commands; package chess.controller.commands;
import chess.io.Command; import chess.controller.Command;
import chess.io.OutputSystem; import chess.controller.OutputSystem;
import chess.model.Coordinate; import chess.model.Coordinate;
import chess.model.Game; import chess.model.Game;
import chess.model.Piece; import chess.model.Piece;

View File

@@ -1,7 +1,7 @@
package chess.io.commands; package chess.controller.commands;
import chess.io.OutputSystem; import chess.controller.OutputSystem;
import chess.io.PlayerCommand; import chess.controller.PlayerCommand;
import chess.model.Game; import chess.model.Game;
public class GrandCastlingCommand extends PlayerCommand { public class GrandCastlingCommand extends PlayerCommand {

View File

@@ -1,7 +1,7 @@
package chess.io.commands; package chess.controller.commands;
import chess.io.OutputSystem; import chess.controller.OutputSystem;
import chess.io.PlayerCommand; import chess.controller.PlayerCommand;
import chess.model.ChessBoard; import chess.model.ChessBoard;
import chess.model.Coordinate; import chess.model.Coordinate;
import chess.model.Game; import chess.model.Game;

View File

@@ -1,7 +1,7 @@
package chess.io.commands; package chess.controller.commands;
import chess.io.Command; import chess.controller.Command;
import chess.io.OutputSystem; import chess.controller.OutputSystem;
import chess.model.ChessBoard; import chess.model.ChessBoard;
import chess.model.Color; import chess.model.Color;
import chess.model.Coordinate; import chess.model.Coordinate;

View File

@@ -1,7 +1,7 @@
package chess.io.commands; package chess.controller.commands;
import chess.io.OutputSystem; import chess.controller.OutputSystem;
import chess.io.PlayerCommand; import chess.controller.PlayerCommand;
import chess.model.ChessBoard; import chess.model.ChessBoard;
import chess.model.Color; import chess.model.Color;
import chess.model.Coordinate; import chess.model.Coordinate;

View File

@@ -1,7 +1,7 @@
package chess.io.commands; package chess.controller.commands;
import chess.io.Command; import chess.controller.Command;
import chess.io.OutputSystem; import chess.controller.OutputSystem;
import chess.model.Color; import chess.model.Color;
import chess.model.Game; import chess.model.Game;

View File

@@ -1,7 +1,7 @@
package chess.io.commands; package chess.controller.commands;
import chess.io.Command; import chess.controller.Command;
import chess.io.OutputSystem; import chess.controller.OutputSystem;
import chess.model.Game; import chess.model.Game;
public class UndoCommand extends Command{ public class UndoCommand extends Command{

View File

@@ -1,4 +1,4 @@
package chess.render; package chess.view.render;
import org.joml.Matrix4f; import org.joml.Matrix4f;
import org.joml.Vector3f; import org.joml.Vector3f;

View File

@@ -1,4 +1,4 @@
package chess.render; package chess.view.render;
import org.lwjgl.opengl.GL30; import org.lwjgl.opengl.GL30;

View File

@@ -1,10 +1,11 @@
package chess.render; package chess.view.render;
import org.joml.Vector3f; import org.joml.Vector3f;
import org.lwjgl.opengl.*; import org.lwjgl.opengl.*;
import chess.view.render.shader.BoardShader;
import static org.lwjgl.opengl.GL30.*; import static org.lwjgl.opengl.GL30.*;
import chess.render.shader.BoardShader;
public class Renderer { public class Renderer {
private BoardShader shader; private BoardShader shader;

View File

@@ -1,4 +1,4 @@
package chess.render; package chess.view.render;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;

View File

@@ -1,4 +1,4 @@
package chess.render; package chess.view.render;
public record VertexAttribPointer(int index, int size, int offset) { public record VertexAttribPointer(int index, int size, int offset) {

View File

@@ -1,4 +1,4 @@
package chess.render; package chess.view.render;
import static org.lwjgl.opengl.GL11.GL_FLOAT; import static org.lwjgl.opengl.GL11.GL_FLOAT;

View File

@@ -1,4 +1,4 @@
package chess.render; package chess.view.render;
import org.lwjgl.*; import org.lwjgl.*;
import org.lwjgl.glfw.*; import org.lwjgl.glfw.*;

View File

@@ -1,4 +1,4 @@
package chess.render.shader; package chess.view.render.shader;
import org.joml.Matrix4f; import org.joml.Matrix4f;

View File

@@ -1,4 +1,4 @@
package chess.render.shader; package chess.view.render.shader;
import java.nio.FloatBuffer; import java.nio.FloatBuffer;
import java.nio.IntBuffer; import java.nio.IntBuffer;

View File

@@ -1,4 +1,4 @@
package chess.simplerender; package chess.view.simplerender;
import java.awt.Image; import java.awt.Image;
import java.util.HashMap; import java.util.HashMap;

View File

@@ -1,4 +1,4 @@
package chess.simplerender; package chess.view.simplerender;
import java.awt.Color; import java.awt.Color;
import java.awt.GridLayout; import java.awt.GridLayout;
@@ -12,15 +12,15 @@ import javax.swing.JOptionPane;
import javax.swing.JPanel; import javax.swing.JPanel;
import javax.swing.SwingUtilities; import javax.swing.SwingUtilities;
import chess.io.Command; import chess.controller.Command;
import chess.io.Command.CommandResult; import chess.controller.CommandExecutor;
import chess.io.CommandExecutor; import chess.controller.OutputSystem;
import chess.io.OutputSystem; import chess.controller.Command.CommandResult;
import chess.io.commands.GetAllowedMovesCommand; import chess.controller.commands.GetAllowedMovesCommand;
import chess.io.commands.GetPieceAtCommand; import chess.controller.commands.GetPieceAtCommand;
import chess.io.commands.MoveCommand; import chess.controller.commands.MoveCommand;
import chess.io.commands.PromoteCommand; import chess.controller.commands.PromoteCommand;
import chess.io.commands.PromoteCommand.PromoteType; import chess.controller.commands.PromoteCommand.PromoteType;
import chess.model.Coordinate; import chess.model.Coordinate;
import chess.model.Move; import chess.model.Move;
import chess.model.Piece; import chess.model.Piece;