Skip to content

FarTow/chess

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

436 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Chess

Here's my first attempt at creating an actual program that isn't bubble-sort or anything school related. If you couldn't guess, the project at hand is chess. This project is being made in Java 11 using Swing.

Description

This project is 50% fun, 25% trying to prove that I'm not awful at programming, and 25% "learning" (which is really pulling my hair out from getting NullPointerException over and over). I've decided to upload to GitHub to practice version control and share my programs with others (for whatever reason). My end goal is to have a chess program with a variety of settings, an easy-to-follow interface with a clean display to match, and generally just a program I can be proud of.

Installation

  1. Clone the repository or download the repository as a .zip file.
    • Extract the files to desired location if downloaded as a .zip file.
  2. Run panels.Main in your IDE or some other method I'm not aware of.
  3. Enjoy!

Progress

Below I have listed the various features/milestones/objectives/other synonym for goal that I have for this project. This includes both completed and future tasks.

Category Incomplete Items Complete Items Notes
Piece Movement Functionality

- All General Piece Movement
- Check
- En Passant
- Castling
- Pawn Promotion

Start Menu

- Start Button
- Timer Settings

General Game Components

- Player Options
    > Draw
    > Resign
    > Takeback

- Board
- Player Info Box
    > Timer
    > Piece Difference Display
- Move History Table

Player Options are currently planned
on being a part of the Player Info Box.

Resizing

- Start Menu
- General Game Components

Game Over Condition Logic

- 3-Fold Repetition
- 50-Move Rule

- Checkmate
- Stalemate

Game Over State

- Back to Start Menu

- Rematch

Options

- Toggle Move Hints
- Auto-Promote Pawn to Queen

Dialog hasn't been implemented yet, let alone functionality.

Miscellaneous

- Chess AI
- Network Capabilities
- Make Application Executable

- Custom Made Pieces

Improvements

The program (unfortunately) contains many inefficient behaviors. The following table lists a description of all issues I am aware of.

Location Inefficiencies Correction
entities.Player

1. updatePieceCount with every update

1. Update when a piece is removed or added to board.

panels.TimeSettings

1. Performs the resize method in actionPerformed.

1. Resize in panel.StartMenu's componentAdapter.

panels.PieceDiffDisplay

1. updateDiffCount in actionPerformed.

1. Update the piece difference when the old count is different from the new count.

panels.Board

1. actionPerformed contains a "check" to see if the board has been initially centered
2. actionPerformed is in charge of formatting time.

1. Center on initialization
2. Format time when a player's second count crosses 60.

panels.MoveHistoryDisplay

1. Performs the resize method in actionPerformed.

1. Resize in panel.Game's componentAdapter.

src

1. Include pre-conditions for every method with parameters
2. Wrap long lines of text
3. Rename variables to be concise
4. General formatting (according to standard coding conventions)

1. Just do it :(

Resources

About

A small chess program created with Java Swing.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages