If I'm working on designing a simple chess game code and I've already created my board layout,
I'm wondering how it is that I implement the pieces (P, p, R, r, N, n, B, b, Q, q, K, k)
(capitals represent white pieces , lowercase are black pieces ) so that the ChessBoard object updates to store the piece at that inputted location?
Should I declare the pieces as instance variables? Or should I just declare them in the main?
As far as the user inputting a location that is already taken, I'm totally lost as to how to translate that into code.
I did however implement a part of the code that displays an error message if the input from the user is outside of the board range.
(this is all in java, by the way)
Any help would be greatly appreciated!! Thanks in advance! Let me know if seeing some of my code would help.