JPII / NavalBattle

Strategic turn-based naval game.
http://jpii.github.io/NavalBattle
GNU General Public License v3.0
3 stars 3 forks source link

Confirm when Ending Turn #246

Closed Matthis5point0 closed 11 years ago

Matthis5point0 commented 11 years ago

Prompt the user before making the move to help @DarkWarHero's slow AI think.

Hi jr

abauer commented 11 years ago

i don't think thats the problem can someone post that array index out of bounds error it has an index of like 2,300 i would like to look at it @maximusvladimir might be the cause

abauer commented 11 years ago

ok list here 1) I agree that the title of this issue needs to occur 2) the "slow AI" problem isn't that its slow or fast, its that when an AI moves too close to a boarder, it searches for an entity outside of the map and the world doesn't know what to do

abauer commented 11 years ago

Exception in thread "AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException: 2339 at com.jpii.navalbattle.pavo.World.getChunk(World.java:97) at com.jpii.navalbattle.pavo.World.getChunk(World.java:100) at com.jpii.navalbattle.pavo.grid.EntityManager.findEntity(EntityManager.java:158) at com.jpii.navalbattle.game.turn.AI.determineCurrentEnemiesS(AI.java:238) at com.jpii.navalbattle.game.turn.AI.takeTurn(AI.java:59) at com.jpii.navalbattle.game.turn.Turn.takeTurn(Turn.java:45) at com.jpii.navalbattle.game.turn.TurnManager.nextTurn(TurnManager.java:22) at com.jpii.navalbattle.gui.listeners.KeyboardListener.keyPressed(KeyboardListener.java:63) at java.awt.Component.processKeyEvent(Unknown Source) at java.awt.Component.processEvent(Unknown Source) at java.awt.Container.processEvent(Unknown Source) at java.awt.Window.processEvent(Unknown Source) at java.awt.Component.dispatchEventImpl(Unknown Source) at java.awt.Container.dispatchEventImpl(Unknown Source) at java.awt.Window.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.KeyboardFocusManager.redispatchEvent(Unknown Source) at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(Unknown Source) at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(Unknown Source) at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(Unknown Source) at java.awt.DefaultKeyboardFocusManager.dispatchEvent(Unknown Source) at java.awt.Component.dispatchEventImpl(Unknown Source) at java.awt.Container.dispatchEventImpl(Unknown Source) at java.awt.Window.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.EventQueue.dispatchEventImpl(Unknown Source) at java.awt.EventQueue.access$200(Unknown Source) at java.awt.EventQueue$3.run(Unknown Source) at java.awt.EventQueue$3.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source) at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source) at java.awt.EventQueue$4.run(Unknown Source) at java.awt.EventQueue$4.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source)

abauer commented 11 years ago

I believe # 2 is fixed

abauer commented 11 years ago

done