I have this chunk of code:
Code:
GameState [] tempGS = new GameState[7];

// for each of the moves a clean gamestate.
for ( int x=1; x<=6; x++)
     tempGS[x] = state.clone();
Then my java compiler says:
Incompatible type for =. Can't convert Object to GameState.

Now I can read, obviously you can't convert GameState object to a GameState.clone() with the equals operator. So what did I do wrong? did I declare tempGS wrong, is there another way to get a copy of state (a GameState) into my array of GameStates?

Thanks!

NOMAD

ps: Yes, GameState is cloneable and no I did not write it (nor can I see it (only have class))