Well I've run into a predicament...
Ok I have 4 classes, 2 I cannot edit,
StateBasedGame
(Not Editable)GameState
(Not Editable)Game extends StateBasedGame
EnhancedGameState extends GameState
The StateBasedGame
contains the public method void addState(GameState state)
, however for the class Game
I want to make this method accept only an EnhancedGameState
, or create a new method, as it contains the method isOrderable()
which I need to call.
This won't work as I will produce a compiler error.
public void addEnhancedState(EnhanchedGameState state){
addState(state);
//Do Other Logic
}
@Override
private void addState(GameState state) {
super.addState(state);
}
There may not be an answer, but how would you go about doing this.
EDIT: I don't want to know why this isn't working. I want to know how to do this.
Thanks in advance,
– Curlip