I have a superclass called player, from that I have made two subclasses one called Human, and one called Ai. Human works fine with no problems the methods are inherited and all is well.
On the other hand Ai does not seem to inherit the methods from the superclass player, if I copy all the methods and properties in from the super class, it will run but that's defeating the point, it also doesn't seem to complain when other parts of my code call the methods which should have been inherited, It doesn't complain but it also doesn't do anything else either.
Both Human, and Ai are the same, but a few of Ai's methods will be overwritten. But Ai does not respond as expected at all, it's almost acting like it's a complete class of it's own with no inheritance, with the exception that calls to the super class do work, for example super(constructor variables); and super.debug();
Is this something to do with this statement from the reference page.
"Note that in Java, and therefore also Processing, you cannot extend a class more than once. Instead, see implements."
If this is why I'm having strange problems extending the player class the second time with AI, why does java show multiple class extending here.
On the other hand Ai does not seem to inherit the methods from the superclass player, if I copy all the methods and properties in from the super class, it will run but that's defeating the point, it also doesn't seem to complain when other parts of my code call the methods which should have been inherited, It doesn't complain but it also doesn't do anything else either.
Both Human, and Ai are the same, but a few of Ai's methods will be overwritten. But Ai does not respond as expected at all, it's almost acting like it's a complete class of it's own with no inheritance, with the exception that calls to the super class do work, for example super(constructor variables); and super.debug();
Is this something to do with this statement from the reference page.
"Note that in Java, and therefore also Processing, you cannot extend a class more than once. Instead, see implements."
If this is why I'm having strange problems extending the player class the second time with AI, why does java show multiple class extending here.
1