Last post Jan 07, 2021 03:50 PM by edhalsim
Jan 07, 2021 03:02 PM|edhalsim|LINK
I'm having the following issue and I don't see a way to upload an image without having a URL to it.
The root class is Player. It contains a virtual method TakeTurn that needs to be implemented by its two sub-classes HumanPlayer and MachinePlayer.
MachinePlayer also has two sub-classes with different functionality: a Client_MachinePlayer, and a Server_MachinePlayer which runs in a web service. The Server_MachinePlayer needs to implement TakeTurn while the Client_MachinePlayer does not.
I don't see a way to declare the TakeTurn method in the MachinePlayer class so that it can be overridden by Server_MachinePlayer.TakeTurn. I can't declare it virtual because you can't have a virtual method inheriting from another virtual method and if I
remove it entirely then it says no suitable method found to override.
Any help would be greatly appreciated. Thanks.
Jan 07, 2021 03:50 PM|edhalsim|LINK
Found this which I think answers my question: