https://github.com/zhutoutoutousan/chess-game
A basic chess game application with a simple AI
https://github.com/zhutoutoutousan/chess-game
chess es6 express game javascript oop p5
Last synced: 7 months ago
JSON representation
A basic chess game application with a simple AI
- Host: GitHub
- URL: https://github.com/zhutoutoutousan/chess-game
- Owner: zhutoutoutousan
- Created: 2020-05-29T18:46:45.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-12-08T02:03:55.000Z (11 months ago)
- Last Synced: 2024-12-08T03:17:33.544Z (11 months ago)
- Topics: chess, es6, express, game, javascript, oop, p5
- Language: JavaScript
- Homepage: https://mxxtherfxxing-chess-game.herokuapp.com/
- Size: 3.59 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 27
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# chess-game
A simple chess game with basic AI
## Tech stack
- ES6
- Object Oriented Programming
- P5.js
- Express
- Node.js
## File structure
```
|--- server.js // main entry node file to be executed by the server
|--- procfile // what to input on heroku dyno interface
|--- package.json
|--- package-lock.json
|--- view --- index.ejs // board view
|--- public ---|--- img
|--- css // body and chessboard
|--- js ---|--- libraries // p5.js
|--- script ---|- Pieces.js
|- board.js
|- chess-ai.js
|- sketch.js
```
# Packages and dependencies
## Front-end
- p5.js
## Back-end
- DX
- Framework
- express
- Template Engine
- ejs
- Resource management
- serve-favicon
- css-loader
- Hot reload
- nodemon
- ENV
- Heroku
- package.json ---> devDependencies
## Testing and automation
- jest
# Progress
- [x] Chessboard
- [ ] Game mechanics
- [ ] When you win, the game is stuck
- [ ] Create save game
- [ ] Create records of movements
- [ ] Chess Pieces
- [x] Initial design
- [x] ? The black bishop sometimes disappear
- [x] ? ```diagsweep``` add logic
- [x] If you click the queen twice, it just disappear
- [x] In QUEEN: ```canMove``` function, the ```basicCondition``` returns the wrong value
- [x] Although it **cannot Move**, it still sees it as ```attacking``` and took itself.
- [x] Source : The execution order of boolean
- [x] Rook can move through pieces vertically(not horizontally)
- [x] Source : Still the execution order of boolean
- [x] Pawn can travel out of bounds
- [ ] Pawn doesn't promote
- [ ] Pawn doesn't en passant
- [x] There is a ```firstTurn``` indicator, but it doesn't work
- [x] When a pawn has been moved, there is no telling whether it is consecutive or not
- [x] Develop the ```canEnPassant``` boolean logic
- [ ] Use pawn class property ```canBeEnPassent```
- [ ] The property switch back to ```false``` before the next move
- [ ] It happened in the ```RunAI()``` function
- [ ] Thinking over this question surpasses the current mental capacity, write it down
- [ ] WORKAROUND: maybe you can add store Enpassant and store it back
- [ ] Chrome devTool technique(optional)
- [ ] Gather as much information as you can
- [ ] Black bishop can move sideways while white can't
- [x] Pawn can't march if it can attack
- [x] Pawn can *march and attack*
- [ ] AI
- [x] Algorithms
- [ ] Enemy loves moving pawn
- [ ] Check the canMove area
- [ ] Check if AI function is working the right way
- [x] Found an error in `canMove` in `Piece` class
- [ ] Decoration
- [ ] Start the game
- [ ] Restart the game
- [ ] Initialize the CSS layout
- [ ] Multiplayer
- [ ] Choose mode
- [ ] Networking
- [ ] Serving
- [x] Heroku note
- [ ] Webpack
- [x] Webpack course
- [ ] Webpack packing
- [x] Deploy
- [ ] [Bulletproof node.js project architecture](https://softwareontheroad.com/ideal-nodejs-project-structure/)
- [ ] Class
- [ ] [Frontend Master course](https://frontendmasters.com/courses/api-design-nodejs-v3/)
- Project architecture
- [ ] Add 'sass-loader'
- [ ] Add 'webpack' for better performance