parent
13c09a8995
commit
76a9a7085e
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,2 @@ |
||||
eclipse.preferences.version=1 |
||||
version=1 |
@ -0,0 +1,13 @@ |
||||
content_assist_proposals_background=255,255,255 |
||||
content_assist_proposals_foreground=60,60,62 |
||||
eclipse.preferences.version=1 |
||||
fontPropagated=true |
||||
org.eclipse.jdt.ui.editor.tab.width= |
||||
org.eclipse.jdt.ui.formatterprofiles.version=12 |
||||
org.eclipse.jdt.ui.javadoclocations.migrated=true |
||||
org.eclipse.jface.textfont=1|Monospace|10.0|0|GTK|1|; |
||||
proposalOrderMigrated=true |
||||
spelling_locale_initialized=true |
||||
tabWidthPropagated=true |
||||
useAnnotationsPrefPage=true |
||||
useQuickDiffPrefPage=true |
@ -0,0 +1,2 @@ |
||||
eclipse.preferences.version=1 |
||||
mylyn.attention.migrated=true |
@ -0,0 +1,2 @@ |
||||
eclipse.preferences.version=1 |
||||
org.eclipse.mylyn.monitor.activity.tracking.enabled.checked=true |
@ -0,0 +1,4 @@ |
||||
eclipse.preferences.version=1 |
||||
migrated.task.repositories.secure.store=true |
||||
org.eclipse.mylyn.tasks.ui.filters.nonmatching=true |
||||
org.eclipse.mylyn.tasks.ui.filters.nonmatching.encouraged=true |
@ -0,0 +1,2 @@ |
||||
eclipse.preferences.version=1 |
||||
pref_first_startup=false |
@ -0,0 +1,5 @@ |
||||
PROBLEMS_FILTERS_MIGRATE=true |
||||
eclipse.preferences.version=1 |
||||
platformState=1426418472410 |
||||
quickStart=false |
||||
tipsAndTricks=true |
@ -0,0 +1,2 @@ |
||||
eclipse.preferences.version=1 |
||||
showIntro=false |
@ -0,0 +1,2 @@ |
||||
ENABLED_DECORATORS=org.eclipse.egit.ui.internal.decorators.GitLightweightDecorator\:true,org.eclipse.jdt.ui.override.decorator\:true,org.eclipse.jdt.ui.interface.decorator\:false,org.eclipse.jdt.ui.buildpath.decorator\:true,org.eclipse.mylyn.context.ui.decorator.interest\:true,org.eclipse.mylyn.tasks.ui.decorators.task\:true,org.eclipse.mylyn.team.ui.changeset.decorator\:true,org.eclipse.pde.ui.binaryProjectDecorator\:false,org.eclipse.team.cvs.ui.decorator\:true,org.eclipse.ui.LinkedResourceDecorator\:true,org.eclipse.ui.SymlinkDecorator\:true,org.eclipse.ui.VirtualResourceDecorator\:true,org.eclipse.ui.ContentTypeDecorator\:true,org.eclipse.ui.ResourceFilterDecorator\:false, |
||||
eclipse.preferences.version=1 |
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,2 @@ |
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?> |
||||
<typeInfoHistroy/> |
@ -0,0 +1,2 @@ |
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?> |
||||
<qualifiedTypeNameHistroy/> |
@ -0,0 +1,10 @@ |
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<section name="Workbench"> |
||||
<section name="org.eclipse.jdt.internal.ui.packageview.PackageExplorerPart"> |
||||
<item value="true" key="group_libraries"/> |
||||
<item value="false" key="linkWithEditor"/> |
||||
<item value="2" key="layout"/> |
||||
<item value="1" key="rootMode"/> |
||||
<item value="<?xml version="1.0" encoding="UTF-8"?>
<packageExplorer group_libraries="1" layout="2" linkWithEditor="0" rootMode="1" workingSetName="Aggregate for window 1426418533468">
<customFilters userDefinedPatternsEnabled="false">
<xmlDefinedFilters>
<child filterId="org.eclipse.jdt.ui.PackageExplorer.LibraryFilter" isEnabled="false"/>
<child filterId="org.eclipse.jdt.ui.PackageExplorer.LocalTypesFilter" isEnabled="false"/>
<child filterId="org.eclipse.jdt.ui.PackageExplorer.StaticsFilter" isEnabled="false"/>
<child filterId="org.eclipse.pde.ui.ExternalPluginLibrariesFilter1" isEnabled="true"/>
<child filterId="org.eclipse.jdt.ui.PackageExplorer.ClosedProjectsFilter" isEnabled="false"/>
<child filterId="org.eclipse.jdt.ui.PackageExplorer.NonSharedProjectsFilter" isEnabled="false"/>
<child filterId="org.eclipse.jdt.ui.PackageExplorer.NonJavaElementFilter" isEnabled="false"/>
<child filterId="org.eclipse.jdt.ui.PackageExplorer.ContainedLibraryFilter" isEnabled="false"/>
<child filterId="org.eclipse.jdt.ui.PackageExplorer.CuAndClassFileFilter" isEnabled="false"/>
<child filterId="org.eclipse.jdt.ui.PackageExplorer.NonJavaProjectsFilter" isEnabled="false"/>
<child filterId="org.eclipse.jdt.internal.ui.PackageExplorer.EmptyInnerPackageFilter" isEnabled="true"/>
<child filterId="org.eclipse.jdt.ui.PackageExplorer.PackageDeclarationFilter" isEnabled="true"/>
<child filterId="org.eclipse.jdt.internal.ui.PackageExplorer.EmptyPackageFilter" isEnabled="false"/>
<child filterId="org.eclipse.jdt.ui.PackageExplorer.ImportDeclarationFilter" isEnabled="true"/>
<child filterId="org.eclipse.jdt.ui.PackageExplorer.FieldsFilter" isEnabled="false"/>
<child filterId="org.eclipse.jdt.internal.ui.PackageExplorer.HideInnerClassFilesFilter" isEnabled="true"/>
<child filterId="org.eclipse.jdt.ui.PackageExplorer.NonPublicFilter" isEnabled="false"/>
<child filterId="org.eclipse.jdt.ui.PackageExplorer_patternFilterId_.*" isEnabled="true"/>
<child filterId="org.eclipse.jdt.ui.PackageExplorer.EmptyLibraryContainerFilter" isEnabled="true"/>
<child filterId="org.eclipse.pde.ui.BinaryProjectFilter1" isEnabled="false"/>
<child filterId="org.eclipse.jdt.ui.PackageExplorer.SyntheticMembersFilter" isEnabled="true"/>
<child filterId="org.eclipse.mylyn.java.ui.MembersFilter" isEnabled="false"/>
</xmlDefinedFilters>
</customFilters>
</packageExplorer>" key="memento"/> |
||||
</section> |
||||
</section> |
Binary file not shown.
@ -0,0 +1,2 @@ |
||||
#Cached timestamps |
||||
#Sun Mar 15 12:22:27 CET 2015 |
@ -0,0 +1,11 @@ |
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<section name="Workbench"> |
||||
<section name="ChooseWorkspaceDialogSettings"> |
||||
<item value="122" key="DIALOG_Y_ORIGIN"/> |
||||
<item value="200" key="DIALOG_X_ORIGIN"/> |
||||
</section> |
||||
<section name="WORKBENCH_SETTINGS"> |
||||
<list key="ENABLED_TRANSFERS"> |
||||
</list> |
||||
</section> |
||||
</section> |
@ -0,0 +1,4 @@ |
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<section name="Workbench"> |
||||
<item value="1024" key="introLaunchBar.location"/> |
||||
</section> |
@ -0,0 +1,15 @@ |
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<section name="Workbench"> |
||||
<section name="org.eclipse.ui.internal.QuickAccess"> |
||||
<item value="900" key="dialogWidth"/> |
||||
<item value="562" key="dialogHeight"/> |
||||
<list key="orderedProviders"> |
||||
</list> |
||||
<list key="textArray"> |
||||
</list> |
||||
<list key="orderedElements"> |
||||
</list> |
||||
<list key="textEntries"> |
||||
</list> |
||||
</section> |
||||
</section> |
@ -0,0 +1,4 @@ |
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<workingSetManager> |
||||
<workingSet aggregate="true" factoryID="org.eclipse.ui.internal.WorkingSetFactory" id="1426418533469_0" label="Window Working Set" name="Aggregate for window 1426418533468"/> |
||||
</workingSetManager> |
@ -0,0 +1,3 @@ |
||||
#Sun Mar 15 12:22:05 CET 2015 |
||||
org.eclipse.core.runtime=2 |
||||
org.eclipse.platform=4.4.2.v20150204-1700 |
@ -1,10 +1,89 @@ |
||||
package world; |
||||
|
||||
public class Node extends Point { |
||||
import world.Point; |
||||
|
||||
public Node(int x, int y) { |
||||
super(x, y); |
||||
// TODO Auto-generated constructor stub
|
||||
public class Node implements Comparable<Node>{ |
||||
//
|
||||
// public static int lowestF;
|
||||
//
|
||||
// public static Point lowestP;
|
||||
|
||||
public static final int G = 1; |
||||
|
||||
private Point current, parent; |
||||
|
||||
private int F, H; |
||||
|
||||
public Node(Point current, Point parent) { |
||||
|
||||
this.current = current; |
||||
this.parent = parent; |
||||
|
||||
H = manhattan(parent, current); |
||||
F = G + H; |
||||
} |
||||
//
|
||||
// public Node(Point current) {
|
||||
// this.current = current;
|
||||
//
|
||||
// H = manhattan(new Point(), current);
|
||||
// F = G + H;
|
||||
// }
|
||||
|
||||
private int manhattan(Point start, Point stop) { |
||||
return Math.abs(start.getX() - stop.getX()) + Math.abs(start.getX() - stop.getY()); |
||||
} |
||||
|
||||
public int getF() { |
||||
return F; |
||||
} |
||||
|
||||
public int getG() { |
||||
return G; |
||||
} |
||||
|
||||
public int getH() { |
||||
return H; |
||||
} |
||||
|
||||
public Point getCurrent() { |
||||
return current; |
||||
} |
||||
|
||||
public Point getParent() { |
||||
return parent; |
||||
} |
||||
|
||||
@Override |
||||
public int compareTo(Node compareNode) { |
||||
|
||||
int compareQuantity = ((Node) compareNode).getF(); |
||||
|
||||
//ascending order
|
||||
return this.F - compareQuantity; |
||||
|
||||
//descending order
|
||||
//return compareQuantity - this.quantity;
|
||||
|
||||
} |
||||
|
||||
@Override |
||||
public boolean equals(Object o) { |
||||
if (this == o) return true; |
||||
if (o == null || getClass() != o.getClass()) return false; |
||||
|
||||
Node node = (Node) o; |
||||
|
||||
if (current.getX() != node.current.getX()) return false; |
||||
if (current.getY() != node.current.getY()) return false; |
||||
|
||||
return true; |
||||
} |
||||
|
||||
@Override |
||||
public int hashCode() { |
||||
int result = current.getX(); |
||||
result = Generator.PX_STEP * result + current.getY(); |
||||
return result; |
||||
} |
||||
} |
||||
|
Loading…
Reference in new issue