change project structure
This commit is contained in:
@@ -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) {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
package chess.io;
|
package chess.controller;
|
||||||
|
|
||||||
import chess.model.Game;
|
import chess.model.Game;
|
||||||
|
|
||||||
@@ -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;
|
||||||
|
|
||||||
@@ -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;
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package chess.io;
|
package chess.controller;
|
||||||
|
|
||||||
import chess.model.Game;
|
import chess.model.Game;
|
||||||
|
|
||||||
@@ -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 {
|
||||||
@@ -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;
|
||||||
@@ -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;
|
||||||
@@ -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 {
|
||||||
@@ -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;
|
||||||
@@ -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;
|
||||||
@@ -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;
|
||||||
@@ -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;
|
||||||
|
|
||||||
@@ -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{
|
||||||
@@ -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;
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package chess.render;
|
package chess.view.render;
|
||||||
|
|
||||||
import org.lwjgl.opengl.GL30;
|
import org.lwjgl.opengl.GL30;
|
||||||
|
|
||||||
@@ -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;
|
||||||
@@ -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;
|
||||||
@@ -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) {
|
||||||
|
|
||||||
@@ -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;
|
||||||
|
|
||||||
@@ -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.*;
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package chess.render.shader;
|
package chess.view.render.shader;
|
||||||
|
|
||||||
import org.joml.Matrix4f;
|
import org.joml.Matrix4f;
|
||||||
|
|
||||||
@@ -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;
|
||||||
@@ -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;
|
||||||
@@ -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;
|
||||||
Reference in New Issue
Block a user