jcgruenhage / chess Goto Github PK
View Code? Open in Web Editor NEWChess implementation for CS Class
Chess implementation for CS Class
IllegalArgumentException is thrown, when a Pawn reaches the other side of the Board, instead of Transforming it into another Figure.
Should be very easy to fix.
Bishop from F8 to D6; Turn 121
-----------------------------------------
8 | Rb | | | | Kb | | | Rb |
-----------------------------------------
7 | | | Nb | | | | | |
-----------------------------------------
6 | | Qb | | Bb | | | Pb | Pb |
-----------------------------------------
5 | Pb | Pb | | Pb | Pb | Pb | | |
-----------------------------------------
4 | | | Pw | Nw | Pw | Bw | Bb | Pw |
-----------------------------------------
3 | Pw | Pw | | Qw | | Pw | Nw | |
-----------------------------------------
2 | | | | | | | Pw | |
-----------------------------------------
1 | | | Rw | | Kw | Bw | | Rw |
-----------------------------------------
A B C D E F G H
Rook from B1 to C1; Turn 122
Exception in thread "main" java.util.ConcurrentModificationException
at java.util.LinkedList$ListItr.checkForComodification(LinkedList.java:966)
at java.util.LinkedList$ListItr.next(LinkedList.java:888)
at edu.gymneureut.informatik.rattenschach.control.controller.RandomController.pickMove(RandomController.java:26)
at edu.gymneureut.informatik.rattenschach.model.Player.measureChooseTime(Player.java:199)
at edu.gymneureut.informatik.rattenschach.model.Player.move(Player.java:189)
at edu.gymneureut.informatik.rattenschach.model.Game.act(Game.java:120)
at edu.gymneureut.informatik.rattenschach.model.Game.play(Game.java:101)
at edu.gymneureut.informatik.rattenschach.control.Main.main(Main.java:29)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)
Process finished with exit code 1
The Timer class is updating both players time at the same time, resulting in the same time for them.
The dynamic text randomly disappears.
Bishop from A3 to B4; Turn 63
-----------------------------------------
8 | | | | Rb | | | Kb | Rb |
-----------------------------------------
7 | | | | | | Pb | Nw | Pb |
-----------------------------------------
6 | | Pb | Pb | | | | Pb | Nb |
-----------------------------------------
5 | | Pb | | | Pw | Pw | | Qw |
-----------------------------------------
4 | | Bw | Pw | Pb | | | | |
-----------------------------------------
3 | | | | | | | | Pw |
-----------------------------------------
2 | | | | Pb | Bw | | | |
-----------------------------------------
1 | Rw | Nw | | | | | | Rw |
-----------------------------------------
A B C D E F G H
Pawn from E3 to D2; Turn 64
Exception in thread "main" java.lang.NullPointerException
at edu.gymneureut.informatik.rattenschach.model.turns.Castling.possibleCastlings(Castling.java:68)
at edu.gymneureut.informatik.rattenschach.model.Player.move(Player.java:188)
at edu.gymneureut.informatik.rattenschach.model.Game.act(Game.java:120)
at edu.gymneureut.informatik.rattenschach.model.Game.play(Game.java:101)
at edu.gymneureut.informatik.rattenschach.control.Main.main(Main.java:27)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)
Process finished with exit code 1
The King can run into situation where he can be captured:
King from H6 to H5; Turn 268
-----------------------------------------
8 | | | | | | | | |
-----------------------------------------
7 | | | | | | | | |
-----------------------------------------
6 | | Pw | | Pw | | | | |
-----------------------------------------
5 | | | | | Nw | | | Kb |
-----------------------------------------
4 | Pw | | | | | | | |
-----------------------------------------
3 | | | | | | | | Pb |
-----------------------------------------
2 | | | | | | | | |
-----------------------------------------
1 | | | | | | | Kw | |
-----------------------------------------
A B C D E F G H
King from F2 to G1; Turn 269
-----------------------------------------
8 | | | | | | | | |
-----------------------------------------
7 | | | | | | | | |
-----------------------------------------
6 | | Pw | | Pw | | | | Kb |
-----------------------------------------
5 | | | | | Nw | | | |
-----------------------------------------
4 | Pw | | | | | | | |
-----------------------------------------
3 | | | | | | | | Pb |
-----------------------------------------
2 | | | | | | | | |
-----------------------------------------
1 | | | | | | | Kw | |
-----------------------------------------
A B C D E F G H
King from H5 to H6; Turn 270
-----------------------------------------
8 | | | | | | | | |
-----------------------------------------
7 | | | | | | | | |
-----------------------------------------
6 | | Pw | | Pw | | | | Kb |
-----------------------------------------
5 | | | | | Nw | | | |
-----------------------------------------
4 | Pw | | | | | | | |
-----------------------------------------
3 | | | | | | | | Pb |
-----------------------------------------
2 | | | | | | | Kw | |
-----------------------------------------
1 | | | | | | | | |
-----------------------------------------
A B C D E F G H
King from G1 to G2; Turn 271
-----------------------------------------
8 | | | | | | | | |
-----------------------------------------
7 | | | | | | | | |
-----------------------------------------
6 | | Pw | | Pw | | | | Kb |
-----------------------------------------
5 | | | | | Nw | | | |
-----------------------------------------
4 | Pw | | | | | | | |
-----------------------------------------
3 | | | | | | | | |
-----------------------------------------
2 | | | | | | | Pb | |
-----------------------------------------
1 | | | | | | | | |
-----------------------------------------
A B C D E F G H
Pawn from H3 to G2; Turn 272
-----------------------------------------
8 | | | | | | | | |
-----------------------------------------
7 | | | | | | | | |
-----------------------------------------
6 | | Pw | | Pw | | | Nw | Kb |
-----------------------------------------
5 | | | | | | | | |
-----------------------------------------
4 | Pw | | | | | | | |
-----------------------------------------
3 | | | | | | | | |
-----------------------------------------
2 | | | | | | | Pb | |
-----------------------------------------
1 | | | | | | | | |
-----------------------------------------
A B C D E F G H
Knight from E5 to G6; Turn 273
-----------------------------------------
8 | | | | | | | | |
-----------------------------------------
7 | | | | | | | | |
-----------------------------------------
6 | | Pw | | Pw | | | Kb | |
-----------------------------------------
5 | | | | | | | | |
-----------------------------------------
4 | Pw | | | | | | | |
-----------------------------------------
3 | | | | | | | | |
-----------------------------------------
2 | | | | | | | Pb | |
-----------------------------------------
1 | | | | | | | | |
-----------------------------------------
A B C D E F G H
King from H6 to G6; Turn 274
-----------------------------------------
8 | | | | | | | | |
-----------------------------------------
7 | | Pw | | | | | | |
-----------------------------------------
6 | | | | Pw | | | Kb | |
-----------------------------------------
5 | | | | | | | | |
-----------------------------------------
4 | Pw | | | | | | | |
-----------------------------------------
3 | | | | | | | | |
-----------------------------------------
2 | | | | | | | Pb | |
-----------------------------------------
1 | | | | | | | | |
-----------------------------------------
A B C D E F G H
Pawn from B6 to B7; Turn 275
-----------------------------------------
8 | | | | | | | | |
-----------------------------------------
7 | | Pw | | | | | | |
-----------------------------------------
6 | | | | Pw | | | Kb | |
-----------------------------------------
5 | | | | | | | | |
-----------------------------------------
4 | Pw | | | | | | | |
-----------------------------------------
3 | | | | | | | | |
-----------------------------------------
2 | | | | | | | | |
-----------------------------------------
1 | | | | | | | Pb | |
-----------------------------------------
A B C D E F G H
Pawn from G2 to G1; Turn 276
-----------------------------------------
8 | | | | | | | | |
-----------------------------------------
7 | | Pw | | Pw | | | | |
-----------------------------------------
6 | | | | | | | Kb | |
-----------------------------------------
5 | | | | | | | | |
-----------------------------------------
4 | Pw | | | | | | | |
-----------------------------------------
3 | | | | | | | | |
-----------------------------------------
2 | | | | | | | | |
-----------------------------------------
1 | | | | | | | Pb | |
-----------------------------------------
A B C D E F G H
Pawn from D6 to D7; Turn 277
Exception in thread "main" java.lang.IllegalArgumentException
at edu.gymneureut.informatik.rattenschach.model.Field.<init>(Field.java:16)
at edu.gymneureut.informatik.rattenschach.model.figures.Pawn.getPossibleMoves(Pawn.java:63)
at edu.gymneureut.informatik.rattenschach.model.Player.move(Player.java:160)
at edu.gymneureut.informatik.rattenschach.model.Game.act(Game.java:120)
at edu.gymneureut.informatik.rattenschach.model.Game.play(Game.java:101)
at edu.gymneureut.informatik.rattenschach.control.Main.main(Main.java:60)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)
Process finished with exit code 1
Also, Pawn Promotion Bug is here as well.
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.