I have finished writing a Hangman game, but I want to move the hangman out of the canvas when the game is over. I create that hangman with any partition of his body. When I move the object it can move only one object at a time. How can I bunch them together?
Asked
Active
Viewed 471 times
0
-
It's not clear to me what "acm" is - you don't refer to it in the question at all - and the rest of your question is very vague. You need to clarify your question before we can reasonably answer it. Please read http://tinyurl.com/so-hints – Jon Skeet Sep 08 '12 at 08:07
-
A hung man is not walking away from the gallows, so how does he move? – Andrew Thompson Sep 08 '12 at 08:07
-
@Jon I suspect the OP is referring to the [ACM graphics API](http://jtf.acm.org/rationale/graphics-package.html). – Andrew Thompson Sep 08 '12 at 08:08
-
1@AndrewThompson: Sounds like a reasonable suspicion. Would have been nice if the OP had told us that, of course... – Jon Skeet Sep 08 '12 at 08:10
2 Answers
1
You have to create an object of the class GCompound. This class of object allows you to create new object that can be manipulated like GOval and so. In the Stanford course, there is an example called GFace.

A_rnO
- 141
- 1
- 5
0
Probably you can refactor your code to make the whole hangman one object through the whole implementation and whenever needed make different parts visible. When the time comes to remove him, just dispose of the whole thing either by resetting them to non-visible or try making a new object I guess... If you cna post the code of your implementation I may be able to give you some more help...

Angelos Chalaris
- 6,611
- 8
- 49
- 75
-
I draw the hangman form GOval and GLine from acm.graphic,and I want to slide him out of canvas when game over,I don't know what part of code that i should post ?? Can i merge all of him particle to one object ?? – DrNutsu Sep 08 '12 at 09:07