Home > chess > Chess00: Introduction

Chess00: Introduction

chess icon 72 This series of articles is about implementing a chess game in Java using Swing.

  • The first article displays the game board and pieces and allows the user to drag the pieces around.
  • The second article introduces a game state variable which will allow the user to only move white pieces or black pieces depending on the current game state.
  • The third article focuses on seperating the user interface classes from the core game classes.
  • The fourth article shows some of the benefits of the seperation achieved in article three by adding a console based user interface on top of the core game classes.
  • The fifth article adds rule enforcements to the game.
  • Article six enhances the user experience by highlighting valid target locations for the currently selected game piece.
  • In the seventh article the game flow logic is enhanced.
  • In article eight a computer player is implemented.
  • The ninth article adds playing over network using a central server.
  1. Rasha
    January 26, 2012 at 2:24 am

    Interesting blog! Thanks for sharing:D I used your approach for implementing a Parcheesi human vs. computer game.

    • proghammer
      January 31, 2012 at 2:33 pm

      Thank you for your feedback, Rasha! If your game is available online, feel free to post a link.

  2. Technocrat
    June 3, 2014 at 10:22 pm

    Usually in every chess game that I’ve played, the piece doesn’t have to just capture the King, it has to get in position that it CAN potentially take the king and then Check is called. The other play is not allowed to make any other move if it does not save its King. CheckMate is called if the King has no other possible moves and if he cannot put a piece in the way of the path of the piece putting the King in check. Could this be accounted for? It’s kind of confusing for how you just have to kill the opponent’s king.

    Also the Pawn’s should be able to move up twice on the first move

    • proghammer
      June 9, 2014 at 9:00 pm

      @Technocrat: It was a conscious decision from my side not to implement all chess rules in order to reduce the complexity of the tutorial. There are also a couple of other rules that are not implemented, e.g. casteling, en passent, etc. You can read more about the reasoning behind it here: enforcing game rules.

  3. It Fithou
    September 14, 2014 at 3:40 am

    Interesting blog! Thanks for sharing

  4. October 5, 2015 at 3:22 pm

    Hi, really nice blog. I’m a Nigerian. We do have computer related courses but relatively backward programming skills and knowledge. Personally, i’ve tried to overcome these limitations and i’ve been going through the internet to acquire as much programming skills as i can. I’ve worked on a chess game with a gui but it was a very poor implementation of a chess gui. The pieces wwere not draggable and will only move after the engine has searched and made a move. This looks really great and i might need some assistance with it. i’m in anticipation of your assistance. Thanks

  1. September 29, 2010 at 4:57 am
  2. March 10, 2011 at 10:22 am

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: