feature: add readme

This commit is contained in:
Stanisław Jarocki 2023-06-20 21:12:54 +02:00
parent c01c236c94
commit ce1a16d7da
4 changed files with 44 additions and 19 deletions

View File

@ -6,14 +6,7 @@
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="594d24b9-cb67-479c-bd03-0c89ab1bafab" name="Changes" comment=""> <list default="true" id="594d24b9-cb67-479c-bd03-0c89ab1bafab" name="Changes" comment="">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" /> <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/com/jarocki/stanislaw/chess/Board/Board.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/com/jarocki/stanislaw/chess/Board/Board.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/com/jarocki/stanislaw/chess/Game.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/com/jarocki/stanislaw/chess/Game.java" afterDir="false" /> <change beforePath="$PROJECT_DIR$/src/com/jarocki/stanislaw/chess/Game.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/com/jarocki/stanislaw/chess/Game.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/com/jarocki/stanislaw/chess/Piece/Bishop.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/com/jarocki/stanislaw/chess/Piece/Bishop.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/com/jarocki/stanislaw/chess/Piece/King.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/com/jarocki/stanislaw/chess/Piece/King.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/com/jarocki/stanislaw/chess/Piece/Knight.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/com/jarocki/stanislaw/chess/Piece/Knight.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/com/jarocki/stanislaw/chess/Piece/Pawn.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/com/jarocki/stanislaw/chess/Piece/Pawn.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/com/jarocki/stanislaw/chess/Piece/Queen.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/com/jarocki/stanislaw/chess/Piece/Queen.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/com/jarocki/stanislaw/chess/Piece/Rook.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/com/jarocki/stanislaw/chess/Piece/Rook.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/com/jarocki/stanislaw/chess/Test.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/com/jarocki/stanislaw/chess/Test.java" afterDir="false" /> <change beforePath="$PROJECT_DIR$/src/com/jarocki/stanislaw/chess/Test.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/com/jarocki/stanislaw/chess/Test.java" afterDir="false" />
</list> </list>
<option name="SHOW_DIALOG" value="false" /> <option name="SHOW_DIALOG" value="false" />
@ -49,7 +42,7 @@
<option name="stateVersion" value="1" /> <option name="stateVersion" value="1" />
</component> </component>
<component name="ProblemsViewState"> <component name="ProblemsViewState">
<option name="selectedTabId" value="CurrentFile" /> <option name="selectedTabId" value="ProjectErrors" />
</component> </component>
<component name="ProjectId" id="2QYS6gFlqUJ1sff56xJOBTXQndq" /> <component name="ProjectId" id="2QYS6gFlqUJ1sff56xJOBTXQndq" />
<component name="ProjectLevelVcsManager" settingsEditedManually="true"> <component name="ProjectLevelVcsManager" settingsEditedManually="true">
@ -59,17 +52,17 @@
<option name="hideEmptyMiddlePackages" value="true" /> <option name="hideEmptyMiddlePackages" value="true" />
<option name="showLibraryContents" value="true" /> <option name="showLibraryContents" value="true" />
</component> </component>
<component name="PropertiesComponent"><![CDATA[{ <component name="PropertiesComponent">{
"keyToString": { &quot;keyToString&quot;: {
"RunOnceActivity.OpenProjectViewOnStart": "true", &quot;RunOnceActivity.OpenProjectViewOnStart&quot;: &quot;true&quot;,
"RunOnceActivity.ShowReadmeOnStart": "true", &quot;RunOnceActivity.ShowReadmeOnStart&quot;: &quot;true&quot;,
"last_opened_file_path": "/home/stanlee77/code/stanchezz", &quot;last_opened_file_path&quot;: &quot;/home/stanlee77/code/stanchezz&quot;,
"project.structure.last.edited": "Project", &quot;project.structure.last.edited&quot;: &quot;Project&quot;,
"project.structure.proportion": "0.0", &quot;project.structure.proportion&quot;: &quot;0.0&quot;,
"project.structure.side.proportion": "0.0", &quot;project.structure.side.proportion&quot;: &quot;0.0&quot;,
"settings.editor.selected.configurable": "editor.preferences.fonts.default" &quot;settings.editor.selected.configurable&quot;: &quot;editor.preferences.fonts.default&quot;
} }
}]]></component> }</component>
<component name="RecentsManager"> <component name="RecentsManager">
<key name="CopyFile.RECENT_KEYS"> <key name="CopyFile.RECENT_KEYS">
<recent name="$PROJECT_DIR$/src/com/jarocki/stanislaw/chess/Piece" /> <recent name="$PROJECT_DIR$/src/com/jarocki/stanislaw/chess/Piece" />

27
readme.md Normal file
View File

@ -0,0 +1,27 @@
# Stanchezz
Is it a chess? Is it a Stan's chess? Is it a Sanchez's chess?
It's a OOP project of working chess implemented in Java.
## Features
- castling (long and short).
- en passant.
- check detection.
- pawn promotion to queen.
- checkmate detection (in progress)
## Deployment
To run this project download the repository, compile it and run.
- In Game.java when you grep for "@tests" you'll find section where you can uncomment predefined sets of moves. Try at least one! For default there is none (getNoPredefinedMoves()).
- After the predefined set of moves run you can start type your own - the input format is e.g. "e2 e4".
## Author
[@Stanisław Jarocki](https://www.github.com/stanlee77)

View File

@ -21,6 +21,7 @@ public class Game {
// for @tests // for @tests
int iteration = 0; int iteration = 0;
String[] testMoves = Test.getNoPredefinedMoves();
// String[] testMoves = Test.getOnlyPawnsOpening(); // String[] testMoves = Test.getOnlyPawnsOpening();
// String[] testMoves = Test.getWrongPawnMoves(); // String[] testMoves = Test.getWrongPawnMoves();
// String[] testMoves = Test.takeQueenOut(); // String[] testMoves = Test.takeQueenOut();
@ -30,7 +31,7 @@ public class Game {
// String[] testMoves = Test.takeKingOut(); // String[] testMoves = Test.takeKingOut();
// String[] testMoves = Test.getCastlingMoves(); // String[] testMoves = Test.getCastlingMoves();
// String[] testMoves = Test.getPawnPromotion(); // String[] testMoves = Test.getPawnPromotion();
String[] testMoves = Test.getOpeningMoves(); // String[] testMoves = Test.getOpeningMoves();
// end of tests // end of tests
while(getIsGameOn()) { while(getIsGameOn()) {

View File

@ -24,6 +24,10 @@ public class Test {
}; };
} }
static public String[] getNoPredefinedMoves() {
return new String[]{};
}
static public String[] takeRookOut() { static public String[] takeRookOut() {
return new String[]{ return new String[]{
"h2 h4", "g7 g5", "h2 h4", "g7 g5",