Giter Club home page Giter Club logo

chess's Introduction

Chess

Chess implementation for Computer Science Class, final year.

Files in edu.gymneureut are files for this project only, Files in de.janchristiangruenhage are probably used again later.

How the game runs:

The class Game calls the Players, for them to provide the turn that they want to execute. The Player then generates a list of possible turns by calling each figure for generating a list of possible turns. In the end the Player passes the generated list to one of the controllers. This controller then chooses the turn to execute.

chess's People

Contributors

jcgruenhage avatar katno avatar

Watchers

 avatar  avatar

chess's Issues

ConcurrentModificationException in RandomController

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

Nullpointer Exception in possibleCastlings method

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

Detecting Mate isn't working properly

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.