Search:

Type: Posts; User: Att1li

Search: Search took 0.13 seconds.

  1. Thread: Class heirarchy

    by Att1li
    Replies
    14
    Views
    1,403

    Re: Class heirarchy

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

    by Att1li
    Replies
    14
    Views
    1,403

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

    by Att1li
    Replies
    14
    Views
    1,403

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

    by Att1li
    Replies
    14
    Views
    1,403

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

    by Att1li
    Replies
    14
    Views
    1,403

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

    by Att1li
    Replies
    14
    Views
    1,403

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

    by Att1li
    Replies
    14
    Views
    1,403

    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...
Results 1 to 7 of 7