Hello
As part of my end of term programming course i'm supposed to push my project to our git server which I have done and it works fine.
The problem is that in the netbeans project folder I have...
Type: Posts; User: Att1li
Hello
As part of my end of term programming course i'm supposed to push my project to our git server which I have done and it works fine.
The problem is that in the netbeans project folder I have...
Ok that's a start , I'll take a loot at that , thanks .
Hello
Now that I found that there is a section for "networking" I know i'm posting in the right place.
Last semester in university I successfully made a graphical chess game (thanks to some...
Ok perhaps someone can describe in a few bullet points how one would implement LAN connection between two PCs for a simple chess game?
Hello
I hope I'm posting in the right sub-section.
Last semester in university I successfully made a graphical chess game (thanks to some people on this forum) in java as my end of term project...
I removed the generator() function and wrote "GUI.generator()" to after the declaration of the JFrame and it seems to be working as I intended now, thanks!
I do not know about the swing timer...
Hello
I've been playing around with 2D graphics in Java and I want to make a timed matrix generator using Thread.sleep() .
Simply put , I have a matrix of squares which is 20x20 blue squares and...
Oh wow.. I solved it.
The mistake was in an If statement which painted the pictures . I used the == operand to equate two strings instead of .equals function.
Hmm ... It seems to be working . I made a class "Game" and class "Donkey" and Class "IoTryout" which includes the main. The Iotryout makes and instance of Game and Game makes an instance of donkey...
Well of course you make a point Greg , but java has shown me miracles that I have not though possible in programming (coming from an embedded background) so I was curious if this could be done
in...
Thank you for your answer Greg
Yes the ChessGame completely defines the current state of the game. It includes all the variables and it creates all the instances of the pieces .
The thing is that...
Hello
Thanks to the help of a few members on this forum I have managed to finish my school assignment which was to make a chess engine.
The engine itself is complete but there is one thing left...
The reason for passing the instance of the pawn to a method in the pawn class is because there are many instances of Pawn so I need to know which one I want to work with .
I don't know if there is a...
Well because in ChessGame I have an array of type ChessPiece (which is a superclass of Pawn and the other pieces) and when I click on the array , I need to know what color the piece I clicked is...
That makes sense to me .. so any method in Pawn that requires access to variables /methods from ChessGame can simply have the instance of ChessGame passed into it and then I can
access what I need....
Hello
I have a question regarding a concept of object oriented programming. This is probably going to be an easy one to answer for you guys.
Lets say I have 2 classes : ChessGame and Pawn
...
Thanks , it's abit more clear now
aussiemcgr:
Thanks for the help.
I once again understood most of it . If I was going to do it this way would I have to declare my pieces Like this:
ChessPiece pawn1Black;
pawn1Black = new...
Yes I understand this , please read the last edit to my last post where I try to make the ChessPiece class abstract and add the methods which all the subclasses contain into it. It gives me a...
Ok here is part of my code:
The Rook Class:
public class Rook extends ChessPiece {
private boolean isAlive; // whether the piece is on the board
private int...
Well yes , but how do I access functions and variables inside the classes?
Lets say we have the following instances:
ChessGame newGame;
ChessPiece newSet;
King whiteKing;
and my array is of...
There is no recursion. I don't know why it loops , but I know that everytime an instance of a King for example is called , then the constructor of the ChessPiece class is called.
I know this from...
Hello
So i'm here again posting some questions about a simple 2-player chess engine that I'm making.
I have a question regarding classes and sub-classes. It requires some explanation of the...
Yes it's a graphical project.
I already have the graphics done and they seem to be working fine.
The clicks on the squares adress the array in ChessGame class to see what is currently on the...
Greg Thanks alot for the Fix!
kingWhite = new King( Shade.WHITE , Rank.KING , 0 , 4 );
Seems to be correct .
The reason I am assigning a parameter Rank and Color to each piece is so the...