summary refs log tree commit diff stats
path: root/src/com/fourisland/fourpuzzle/gamestate/mapview/event/specialmove/MoveEventThread.java
Commit message (Collapse)AuthorAgeFilesLines
* Engine: Fixed many potential bugsStarla Insigna2009-03-191-1/+2
| | | | Identified by FindBugs. http://findbugs.sourceforge.net/
* Engine: Commented a lot of codeStarla Insigna2009-03-081-1/+1
|
* Engine: Added Event Thread cancellationStarla Insigna2009-02-231-12/+47
|
* Added support for other System filesStarla Insigna2009-02-081-0/+0
| | | | | | Because the coordinates and transparent color previously used were tuned for the default System file, the coordinates were changed to be more forgiving and the color is picked from the last pixel of the first row from the graphic. Also, for some reason, every file in source control has been marked as modified, even though most haven't been. Don't know why this happened.
* Added Executor to MoveEventThreadStarla Insigna2009-02-031-12/+17
|
* Fixed [Gotez06] InterruptedException violationStarla Insigna2009-02-031-11/+5
|
* Fixed MoveEventThread latch breakageStarla Insigna2009-02-031-16/+16
| | | | | | | | Previously, MoveEventThread used a CountDownLatch to power it's moveAll() function. However, because CountDownLatch can only count down and not back up, every time a MoveEventThread was spawned, it's static moveEventWait (which was a CountDownLatch) would be re-instantated. If a thread was already waiting on the CountDownLatch, it would be disrupted. This meant that if the first MoveEventThread spawned completed before the rest, the entire program would grind to a halt. This has been fixed by replacing the CountDownLatch with a Semaphore (not exactly what Semaphore is supposed to be used for, but it works). Every time a MoveEventThread is spawned, it acquires a permit from the Semaphone and releases it when it completes. moveAll() then attempts to acquire 100 permits (the Semaphore is initalized to only allow 100 permits), which blocks until all MoveEventThreads have completed. The downside of this is that only 100 MoveEventThreads can execute at once, but it is exceptionally unlikely that such an event will occur. Also, if this does occur, the other MoveEventThreads will simply wait for another to complete and then acquire a permit.
* Added support for OnHeroTouch eventsStarla Insigna2009-02-031-0/+9
| | | | | | | | Also fixed two bugs: 1. In the condition where a StepMoveEvent is called upon an Event whose animation type does not allow them to turn in the desired direction, they will move in the direction they are already in and walk off the screen while doing so. This was fixed by checking (after the event's direction has been set during the startMoving() process) that the event was able to face in the correct direction. 2. If a StepMoveEvent was enacted on an event that was already moving, it would be skipped. This has been fixed by waiting for the desired event to complete moving at the start of MoveEventThread.
* Fixed "walk-thru-me" bugStarla Insigna2009-01-271-2/+16
| | | | Previously, Map's checkForCollision did not properly check collision and would allow an event to initiate movement to a location another event was already moving to (but wasn't at yet).
* Replaced checked exceptions with RuntimeExceptionStarla Insigna2009-01-241-5/+1
|
* Fixed MoveEvent bugStarla Insigna2009-01-191-5/+23
|
* Imported sourcesStarla Insigna2009-01-171-0/+50