jonne-sotala / tirachess Goto Github PK
View Code? Open in Web Editor NEWData structures and algorithms: Lab project
Data structures and algorithms: Lab project
I cloned the repository on Thursday at 17:57.
Some instructions about how to use the application would have been nice. The code seems a bit too difficult for me to understand fully. Implementation and user guide documents are empty, they could have given me a better understanding of the application. According to your week reports and the behaviour of the program it seems that two AI players are playing. And they implement the same algorithm to play. The game and moves seem to be same for every time you run the application. I’m surprised how fast the algorithm is, good job!
MyHashMap()
-You could overload the constructor?
-”old_entries” should propably be “oldEntries”
-”Extends the length of inner array by two” gives a wrong impression. The length is multiplied by two.
MyArrayList()
-Could “private Object[] elements” be private “E[] elements”? Could you then get rid of the @SuppressWarnings(“unchecked”) part if you don’t need to cast (as E) ?
BoardTest.java
-use assertTrue(p.whitesMove) instead of assertEquals(true, p.whitesMove)
-test methods don’t need to have “test” in their method name
-on the java courses by our university I think it was recommended to only have one assert for each test method (one test tests only one thing or something like that)
-I’m a bit confused, the name of the class is BoardTest but many tests seem to use Position class’s methods. Usually test classes are named by the class it tests and they test if that class’s methods do what they are supposed to do. I cannot find a Board class. I think you need more test classes.
I think some classes have too many duties, they have quite the amount of code. There should be more classes so that each class has a smaller range of duties. And perhaps a name that describes the class’s duties more. These also make the JUnit testing easier.
I don’t know how you should test the performance of this kind of algorithm. Perhaps you could stage situations (like Scholar’s mate and Fool’s mate) by making a game situation one step before check mate. And then you get to test if the player(which turn it is) wins the game in one move. You could also have different options for the starting move (selected by seed/random) and see what the algorithm does. Perhaps you need to focus on manual testing rather than automated tests and document the manual testing properly. But how can one really now that the chosen move was the best solution? I certainly do not have the chess skills or the patience to check every possible move and to find the best move to be made.
Check checkstyle errors. There are 36 of them. In another course only about 5-10 were acceptable.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.