Search:

Type: Posts; User: Att1li

Page 1 of 2 1 2

Search: Search took 0.19 seconds.

  1. Replies
    0
    Views
    111

    Uploading PDF in netbeans GIT

    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...
  2. Replies
    2
    Views
    541

    Re: Simple Lan connection in Java

    Ok that's a start , I'll take a loot at that , thanks .
  3. Replies
    2
    Views
    541

    Simple Lan connection in Java

    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...
  4. Replies
    1
    Views
    394

    [SOLVED] Re: Lan networking in Java

    Ok perhaps someone can describe in a few bullet points how one would implement LAN connection between two PCs for a simple chess game?
  5. Replies
    1
    Views
    394

    [SOLVED] Lan networking in Java

    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...
  6. Replies
    3
    Views
    227

    Re: Timed matrix generation

    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...
  7. Replies
    3
    Views
    227

    Timed matrix generation

    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...
  8. Replies
    7
    Views
    528

    Re: Saving & Loading a ChessGame

    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.
  9. Replies
    7
    Views
    528

    Re: Saving & Loading a ChessGame

    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...
  10. Replies
    7
    Views
    528

    Re: Saving & Loading a ChessGame

    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...
  11. Replies
    7
    Views
    528

    Re: Saving & Loading a ChessGame

    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...
  12. Replies
    7
    Views
    528

    Saving & Loading a ChessGame

    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...
  13. Replies
    9
    Views
    371

    Re: A question of accessibility in OOP

    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...
  14. Replies
    9
    Views
    371

    Re: A question of accessibility in OOP

    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...
  15. Replies
    9
    Views
    371

    Re: A question of accessibility in OOP

    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....
  16. Replies
    9
    Views
    371

    A question of accessibility in OOP

    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
    ...
  17. Thread: Class heirarchy

    by Att1li
    Replies
    14
    Views
    351

    Re: Class heirarchy

    Thanks , it's abit more clear now
  18. Thread: Class heirarchy

    by Att1li
    Replies
    14
    Views
    351

    Re: Class heirarchy

    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...
  19. Thread: Class heirarchy

    by Att1li
    Replies
    14
    Views
    351

    Re: Class heirarchy

    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...
  20. Thread: Class heirarchy

    by Att1li
    Replies
    14
    Views
    351

    Re: Class heirarchy

    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...
  21. Thread: Class heirarchy

    by Att1li
    Replies
    14
    Views
    351

    Re: Class heirarchy

    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...
  22. Thread: Class heirarchy

    by Att1li
    Replies
    14
    Views
    351

    Re: Class heirarchy

    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...
  23. Thread: Class heirarchy

    by Att1li
    Replies
    14
    Views
    351

    Class heirarchy

    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...
  24. Replies
    5
    Views
    306

    Re: Problems with objects and enum

    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...
  25. Replies
    5
    Views
    306

    Re: Problems with objects and enum

    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...
Results 1 to 25 of 37
Page 1 of 2 1 2