This site requires JavaScript, please enable it in your browser!
Greenfoot back
ytm
ytm wrote ...

2020/5/5

Acces class of new world without instanciate it?

ytm ytm

2020/5/5

#
-Actual class : Actual.class -Instantiate World (X) who has a method to call the the constructor of another world (Y) when key is pressed -If I am in a class exterior (Actual class) to those worlds (X,Y), is there any way to return the class name of the second world (Y) without instantiate it in Actual.class ?
danpost danpost

2020/5/5

#
I am not sure I understand your question. What is to be accomplished if you had the name of the second class?
ytm ytm

2020/5/5

#
hi danpost thanks for your reply! it is to do an integrative test. I want to test that when the key is pressed in world X, the second world is created
danpost danpost

2020/5/5

#
ytm wrote...
hi danpost thanks for your reply! it is to do an integrative test. I want to test that when the key is pressed in world X, the second world is created
What code have you tried for checking key press and checking world creation?
You need to login to post a reply.