You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a complete Chess game implemented in Java using Swing for the GUI and JDBC for connecting to a MySQL database. The game follows standard chess rules including legal move validation, check, checkmate, castling, and en passant. Move history can be persisted using a MySQL database.
55
+
56
+
---
57
+
58
+
## 📁 Project Structure
59
+
60
+
JavaChess-main/
61
+
├── src/
62
+
│ ├── com/chess/database/DatabaseConnection.java
63
+
│ ├── com/chess/model/MoveRecord.java
64
+
│ ├── com/chess/dao/MoveHistoryDAO.java
65
+
│ └── com/chess/GUI/GameHistoryPanel.java
66
+
├── Chess pieces/ # Image assets
67
+
├── JChess.java # Main game entry point
68
+
└── README.md # This file
69
+
70
+
swift
71
+
Copy
72
+
Edit
73
+
74
+
---
75
+
76
+
## ✅ 5. JDBC Implementation (3 Marks)
77
+
78
+
We've successfully implemented JDBC to enable interaction between our Java Chess game and a MySQL database.
79
+
80
+
- A dedicated `DatabaseConnection.java` class was created to handle the database connection logic.
81
+
- JDBC is used to connect the Java application to a MySQL database (`chessdb`).
82
+
- This connection will support storing and retrieving move history or other game-related data in future extensions.
0 commit comments