sokoban-solver's People
Forkers
tequila21 wemadedream rbrnx patocarranza algernonfleur royswale amberwangjie patrickestark coldwinter2 yangzi-jiang bilalamichi namelessfi5 virax11 edlin0249 csl122 dixantmittal newsky les-amateurssokoban-solver's Issues
bug in the State hashCode and equals method
If two states have the same boxes, but the order of iteration are different , then the hashcodes are different. And we can't compare two Hashset with "==" directly.
/**
* Implemented hashcode to check if state is already explored
*/
@Override
public int hashCode() {
int result = 17;
**for (Coordinate b : boxes) {
result = 37 * result + b.hashCode();
}**
result = 37 * result + player.hashCode();
return result;
}
/**
* Overriding equals for contains() method
*/
@Override
public boolean equals(Object object){
if (object == null) return false;
if (object == this) return true;
if (this.getClass() != object.getClass()) return false;
State s = (State)object;
if(this.hashCode()== s.hashCode()) return true;
**if((this.boxes == s.boxes) && (this.player == s.player)) return true;**
return false;
}
javax.imageio.IIOException: Can't read input file
$ java SokobanTester
IO Exception occured
javax.imageio.IIOException: Can't read input file!
at java.desktop/javax.imageio.ImageIO.read(ImageIO.java:1308)
at MainFrame.getTopPanel(MainFrame.java:172)
at MainFrame.init(MainFrame.java:78)
at MainFrame.<init>(MainFrame.java:61)
at SokobanTester.main(SokobanTester.java:13)
$ java SokobanTester < assholesokoban.txt
IO Exception occured
javax.imageio.IIOException: Can't read input file!
at java.desktop/javax.imageio.ImageIO.read(ImageIO.java:1308)
at MainFrame.getTopPanel(MainFrame.java:172)
at MainFrame.init(MainFrame.java:78)
at MainFrame.<init>(MainFrame.java:61)
at SokobanTester.main(SokobanTester.java:13)
It's broken.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.