diff --git a/Chess2/Main.java b/Chess2/Main.java new file mode 100755 index 0000000..6c557bb --- /dev/null +++ b/Chess2/Main.java @@ -0,0 +1,28 @@ +package chess; + +import java.awt.Canvas; +import java.awt.Graphics; +import javax.swing.JFrame; + +import chess.Chess; + +public class Main extends Canvas { + + public static void main(String[] args) { + Chess chess = new Chess(); + chess.main(); + + // System.out.println(Piece.blackKing); + // JFrame frame = new JFrame("Chess Game"); + // Canvas canvas = new Drawing(); + // canvas.setSize(400, 400); + // frame.add(canvas); + // fram[Java 536871240]e.pack(); + // frame.setVisible(true); + } + + + public void paint(Graphics g) { + // g.fillOval(100, 100, 200, 200); + } +} diff --git a/Chess2/chess/Board.java b/Chess2/chess/Board.java new file mode 100644 index 0000000..db1e4fd --- /dev/null +++ b/Chess2/chess/Board.java @@ -0,0 +1,26 @@ +package chess; + +public class Board { + protected String[][] cells = { + {"wr", "wh", "wb", "wq", "wk", "wb", "wh", "wr"}, + {"wp", "wp", "wp", "wp", "wp", "wp", "wp", "wp"}, + {" ", " ", " ", " ", " ", " ", " ", " "}, + {" ", " ", " ", " ", " ", " ", " ", " "}, + {" ", " ", " ", " ", " ", " ", " ", " "}, + {" ", " ", " ", " ", " ", " ", " ", " "}, + {"br", "bh", "bb", "bq", "bk", "bb", "bh", "br"}, + {"bp", "bp", "bp", "bp", "bp", "bp", "bp", "bp"} + }; + + public Board() { + } + + public void print() { + for (String[] rows : cells) { + for (String piece : rows) { + System.out.print(piece); + } + System.out.print("\n"); + } + } +} diff --git a/Chess2/chess/Chess.java b/Chess2/chess/Chess.java new file mode 100644 index 0000000..91010da --- /dev/null +++ b/Chess2/chess/Chess.java @@ -0,0 +1,19 @@ +package chess; + +public class Chess { + public Board board; + public boolean done = false; + + public Chess() { + } + + public void main() { + while (!done) { + loop(); + } + } + + protected void loop() { + done = true; + } +} diff --git a/Chess2/chess/Piece.java b/Chess2/chess/Piece.java new file mode 100644 index 0000000..fbfe224 --- /dev/null +++ b/Chess2/chess/Piece.java @@ -0,0 +1,19 @@ +package piece; + +public class Piece { + // public Hashtable my_dict = new Hashtable(); + + // public int empty = 0;e + // public int whitePawn = 1;p + // public int whiteKnight = 2;h // "horseman" + // public int whiteBishop = 3;b + // public int whiteRook = 4;r + // public int whiteQueen = 5;q + // public int whiteKing = 6;k + // public int blackPawn = -1; + // public int blackKnight = -2; + // public int blackBishop = -3; + // public int blackRook = -4; + // public int blackQueen = -5; + // public int blackKing = -6; +} diff --git a/First Repository/myAwesomeFirstTestOnJava/.project b/First Repository/myAwesomeFirstTestOnJava/.project index dd79fc6..933e6d9 100644 --- a/First Repository/myAwesomeFirstTestOnJava/.project +++ b/First Repository/myAwesomeFirstTestOnJava/.project @@ -14,4 +14,15 @@ org.eclipse.jdt.core.javanature + + + 1614941341885 + + 30 + + org.eclipse.core.resources.regexFilterMatcher + node_modules|.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__ + + +