chess's People
Forkers
islamailanichess's Issues
Add documentation for Empty as a kind of chess piece
In chessPiece/ chessBoard/ Empty.
Make them into package
Make them into package:
- models
- chessPieces
Change stop judgement for iterative checking availability
Get rid of the magic digit...
Checkmate is not working
Modify iterativeAddPossiblePosition
- I would break the function signature into two separate lines to improve readability
- As mentioned in discussion section, it would be better if maxIteration were -1 if you want to add possible Positions until you reach the end of the board (this way you can resize the board and the function will still work).
- How about "xDelta" instead of "toRight" and "yDelta" instead of "toUp". "toRight" gives me the impression that I should only go rightward.
- For this reason, the line "position = new Position(position.getRight(toRight).getUp(toUp))" is also a bit unclear. Especially because you can "getLeft" by adding a negative value.
- What if the Position class had a function "getRelativePosition( int xDelta, int yDelta)"?
Change name in chessPiece package
Remove CP
in front of the name.
Add an addRecord in chess board for recording
Add an addRecord in chess board for recording.
Remove the original record adding logic in chessPiece class.
"possibleNextPosition" should be "possibleNextPositions"
Add more test case for chess movements
Change ChessPiece subclass contructors
do not use gutters in constructor in subclass constructor
Unit Test
Implement Unit Test
Add checking king condition
After a move, if we check the king of other side. Then notify.
Checkmate understanding is wrong
- A player wins when the opponent is in check and has no moves available. Your code has it so that a player wins if they capture the king (which should never really happen).
- Your code doesn't work; in particular, you don't prevent a player from moving a piece if that puts their own king in check.
Use Doxygen to replace Javadoc
Use Doxygen to replace Javadoc...
Move move function to chess piece
showPossibleNextPosition enhancement
use the "for each" loop in java to iterate through a list. It will look like:
for( Position possibleNextPosition : this.possibleNextPositions)
- This is because it conveys what is being done in a more clean manner, and involves less variables.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.