[GREENFOOT-710] Intermittent bug when removing object from the world class
This is a bug reported by one of the Greenfoot teachers. The project that shows the bug is attached. "It is solitaire game Aces Up. One team had a strange intermittent bug where, rarely, calling removeObject() on a Card caused it to be moved to (0, 0) rather than disappearing from the world. The removal happens in the method Pile.removeTopCard(). The problem has occurred with Greenfoot 3.1.0 on two different Mac computers, the most recent running OS X El Capitan (10.11.6)" There is a link of the video showing many successful card removals, followed by an occurrence of the bug [[https://drive.google.com/open?id=1wHtecsmkHHR-SBCWCMtqWI8kmgbTJFE-|https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdrive.google.com%2Fopen%3Fid%3D1wHtecsmkHHR-SBCWCMtqWI8kmgbTJFE-&data=01%7C01%7CHamza.Hamza%40kcl.ac.uk%7C8d6f719ba78042201e1008d5b9c6138a%7C8370cf1416f34c16b83c724071654356%7C0&sdata=Iikq4vz9k9NqtHdfm2t4ew2y9guvrF9o47W8L8Zjr9w%3D&reserved=0]]. The rules for the game is summarised:
- Clicking on the deck deals a card to each of 4 piles.
- A card can be removed from the top of a pile by clicking on it if another card of the same suit and higher rank is at the top of a pile.
- A card can be moved from the top of a pile to an empty pile by dragging it.
- To win the game, the deck must be empty with exactly 1 ace in each pile.
It is also attached in this ticket the screenshot of the bug.
!image.png!
Issue metadata
- Issue type: Bug
- Priority: Medium
- Fix versions: 3.5.1