Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 73: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 74: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 75: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 76: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 77: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 78: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
package algorithms.astar; import java.awt.Point; import algorithms.astar.AStar.AStarMode; import enums.MazeField; /** * * @author plusminus * @since 18.06.2007 - 18:06:57 */ public class AdvancedMapElement { /* * ######################################################### * ######################## FIELDS ######################### * ######################################################### */ @Override public boolean equals(Object obj) { if (!(obj instanceof AdvancedMapElement)) return false; if (((AdvancedMapElement) obj).getItsCoordinates().equals( this.itsCoordinates)) return true; else return false; } /** * In this case the number of squares that were entered */ private float costsUpToHere = 0; /** * Holds the costs the are probably needed to reach the target. */ private float estimatedRestCosts = 0; private AdvancedMapElement fieldEnteredFrom = null; // TODO Not definitely needed, could be replaced... private MazeField itsMazeField = null; private Point itsCoordinates = null; /* * ######################################################### * ##################### CONSTRUCTORS ###################### * ######################################################### */ public AdvancedMapElement(float aCostsUpToHere, float aEstimatedRestCosts, Point someCoordinates, MazeField aMazeField, AdvancedMapElement aFieldEnteredFrom) { this.costsUpToHere = aCostsUpToHere; this.itsMazeField = aMazeField; this.estimatedRestCosts = aEstimatedRestCosts; this.fieldEnteredFrom = aFieldEnteredFrom; this.itsCoordinates = someCoordinates; } /* * ######################################################### * #################### GETTER & SETTER #################### * ######################################################### */ public float getEstimatedRestCosts() { return this.estimatedRestCosts; } public float getCostsUpToHere() { return this.costsUpToHere; } public AdvancedMapElement getFieldEnteredFrom() { return this.fieldEnteredFrom; } public MazeField getItsMazeField() { return itsMazeField; } public Point getItsCoordinates() { return itsCoordinates; } public int getX() { return this.itsCoordinates.x; } public int getY() { return this.itsCoordinates.y; } /* * ######################################################### * ######################## METHODS ######################## * ######################################################### */ /** * Calculates the total 'quality' of this item.
* Whereas lower means better!
* * @return LEASTEFFORT: getEstimatedRestCosts();
* LEASTEFFORT: getCostsUpToHere() + getEstimatedRestCosts(); * */ public float getTotalQuality(AStarMode aMode) { switch (aMode) { case LEASTEFFORT: return getEstimatedRestCosts(); case SHORTEST: return getCostsUpToHere() + getEstimatedRestCosts(); default: throw new IllegalArgumentException(); } } }