Thanks guys. I turned my homework in and hopefully I get a decent grade or at least some more feedback on what I did wrong
Type: Posts; User: x3rubiachica3x
Thanks guys. I turned my homework in and hopefully I get a decent grade or at least some more feedback on what I did wrong
My bad, I meant method. I keep getting my C++ mixed with java.
public Board(String[] occupied){
Board chessBoard = new Board();
chessBoard[2][5] = occupied;
return...
This is what he has specified, he does want me to use the string as a constructor
Write a constructor with one argument String[] occupied, which is a list of those squares in the board that are...
public class Board{
public Board(){
int row, col;
int Board[][] = new int [8][8];
int value = Board[row][col];
}
public Board(String[] occupied){
...
My compiler keeps on throwing me an error that it doesnt know what Board is when I try to initialize some spaces in the occupied string function
Board(String[] occupied){
Board[1][2] =...
He wants us to initialize some spaces on the board to be occupied.
So then do I fill the
Board(String[] occupied){
}
with spaces that already contain pieces? Thats what this constructor is for, right?
I myself am not absolutely positive at what he wants by this. I get a hold of him today, cause he wont be here until 2 and thats when my class is. And I just realized I have to also create a class...
So for this occupied function
Board(string[] occupied)
my professor wants me to choose a couple values in my array and give them a value of 1, to show that tha space is occupied.How would I do...
I think I'm understanding some of this. The ; at the end of my for loops was just out of habit I guess.
1) Is that piece of code what I'm supposed to use if the space is occupied? Will I even need...
Yes, I don't know how to implement anything. I just turned in a C++ assignment today and I don't know how to go about this program at all. I can make a board and thats about it :/
Hi, I'm trying to write a simple chess program for my java class. And I;m not exactly sure how to do it.
We have these specifications:
* Write a constructor with no arguments which initializes...