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">
<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$/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/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" />
</list>
<option name="SHOW_DIALOG" value="false" />
@ -49,7 +42,7 @@
<option name="stateVersion" value="1" />
</component>
<component name="ProblemsViewState">
<option name="selectedTabId" value="CurrentFile" />
<option name="selectedTabId" value="ProjectErrors" />
</component>
<component name="ProjectId" id="2QYS6gFlqUJ1sff56xJOBTXQndq" />
<component name="ProjectLevelVcsManager" settingsEditedManually="true">
@ -59,17 +52,17 @@
<option name="hideEmptyMiddlePackages" value="true" />
<option name="showLibraryContents" value="true" />
</component>
<component name="PropertiesComponent"><![CDATA[{
"keyToString": {
"RunOnceActivity.OpenProjectViewOnStart": "true",
"RunOnceActivity.ShowReadmeOnStart": "true",
"last_opened_file_path": "/home/stanlee77/code/stanchezz",
"project.structure.last.edited": "Project",
"project.structure.proportion": "0.0",
"project.structure.side.proportion": "0.0",
"settings.editor.selected.configurable": "editor.preferences.fonts.default"
<component name="PropertiesComponent">{
&quot;keyToString&quot;: {
&quot;RunOnceActivity.OpenProjectViewOnStart&quot;: &quot;true&quot;,
&quot;RunOnceActivity.ShowReadmeOnStart&quot;: &quot;true&quot;,
&quot;last_opened_file_path&quot;: &quot;/home/stanlee77/code/stanchezz&quot;,
&quot;project.structure.last.edited&quot;: &quot;Project&quot;,
&quot;project.structure.proportion&quot;: &quot;0.0&quot;,
&quot;project.structure.side.proportion&quot;: &quot;0.0&quot;,
&quot;settings.editor.selected.configurable&quot;: &quot;editor.preferences.fonts.default&quot;
}
}]]></component>
}</component>
<component name="RecentsManager">
<key name="CopyFile.RECENT_KEYS">
<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
int iteration = 0;
String[] testMoves = Test.getNoPredefinedMoves();
// String[] testMoves = Test.getOnlyPawnsOpening();
// String[] testMoves = Test.getWrongPawnMoves();
// String[] testMoves = Test.takeQueenOut();
@ -30,7 +31,7 @@ public class Game {
// String[] testMoves = Test.takeKingOut();
// String[] testMoves = Test.getCastlingMoves();
// String[] testMoves = Test.getPawnPromotion();
String[] testMoves = Test.getOpeningMoves();
// String[] testMoves = Test.getOpeningMoves();
// end of tests
while(getIsGameOn()) {

View File

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