Skip to content

Commit

Permalink
Fixed side-effect type macro.
Browse files Browse the repository at this point in the history
  • Loading branch information
mmlacak committed Jan 23, 2025
1 parent fd4fe65 commit 3f6f147
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 8 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ converted to UTC for easier comparison.
**Application** and **library versions** can be seen in an application, using `version` command. \
The latest versions are:

Application: 0.0.1.99:1278+20250122.091156 <!--- readme-new-app-version-major-minor-feature-commit+meta~breaks-place-marker --> \
Library: 0.0.1.99:1278+20250122.091156 <!--- readme-new-lib-version-major-minor-feature-commit+meta~breaks-place-marker -->
Application: 0.0.1.100:1279+20250123.211658 <!--- readme-new-app-version-major-minor-feature-commit+meta~breaks-place-marker --> \
Library: 0.0.1.100:1279+20250123.211658 <!--- readme-new-lib-version-major-minor-feature-commit+meta~breaks-place-marker -->

Versioning used is [Natural Versioning 1.2](https://croatian-chess.blogspot.com/p/natver.html),
with meta data containing the same format as the book version.
Expand Down
2 changes: 1 addition & 1 deletion ws/crochess/src/crochess.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#include "crochess.h"


char const CROCHESS_VERSION[] = "0.0.1.99:1278+20250122.091156"; // source-new-crochess-version-major-minor-feature-commit+meta~breaks-place-marker
char const CROCHESS_VERSION[] = "0.0.1.100:1279+20250123.211658"; // source-new-crochess-version-major-minor-feature-commit+meta~breaks-place-marker

#ifdef __WITH_LINE_NOISE__
char const CROCHESS_HISTORY_FILE_NAME[] = "history_crochess.txt";
Expand Down
15 changes: 12 additions & 3 deletions ws/libcrochess/inc/cc_side_effect.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,18 @@
|| ( (sete) == CC_SETE_Divergence ) )

// All side-effects with which a ply can end.
#define CC_SIDE_EFFECT_TYPE_CAN_TERMINATE_PLY(sete) ( ( (sete) != CC_SETE_None ) \
&& ( (sete) != CC_SETE_Transparency ) \
&& ( (sete) != CC_SETE_Divergence ) )
#define CC_SIDE_EFFECT_TYPE_CAN_TERMINATE_PLY(sete) ( ( (sete) == CC_SETE_Capture ) \
|| ( (sete) == CC_SETE_Displacement ) \
|| ( (sete) == CC_SETE_EnPassant ) \
|| ( (sete) == CC_SETE_Castle ) \
|| ( (sete) == CC_SETE_Promotion ) \
|| ( (sete) == CC_SETE_TagForPromotion ) \
|| ( (sete) == CC_SETE_Conversion ) \
|| ( (sete) == CC_SETE_FailedConversion ) \
|| ( (sete) == CC_SETE_DemoteToPawn ) \
|| ( (sete) == CC_SETE_Resurrection ) \
|| ( (sete) == CC_SETE_ResurrectingOpponent ) \
|| ( (sete) == CC_SETE_FailedResurrection ) )

// All side-effects which ends a ply.
#define CC_SIDE_EFFECT_TYPE_TERMINATES_PLY(sete) ( ( (sete) == CC_SETE_EnPassant ) \
Expand Down
2 changes: 1 addition & 1 deletion ws/libcrochess/src/cc_version.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
#include "cc_version.h"


char const CC_LIB_VERSION[] = "0.0.1.99:1278+20250122.091156"; // source-new-libcrochess-version-major-minor-feature-commit+meta~breaks-place-marker
char const CC_LIB_VERSION[] = "0.0.1.100:1279+20250123.211658"; // source-new-libcrochess-version-major-minor-feature-commit+meta~breaks-place-marker
2 changes: 1 addition & 1 deletion ws/tests/src/tests.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
#include "tests.h"


char const CROCHESS_TESTS_VERSION[] = "0.0.1.99:1278+20250122.091156"; // source-new-crochess-tests-version-major-minor-feature-commit+meta~breaks-place-marker
char const CROCHESS_TESTS_VERSION[] = "0.0.1.100:1279+20250123.211658"; // source-new-crochess-tests-version-major-minor-feature-commit+meta~breaks-place-marker

#ifdef __WITH_LINE_NOISE__
char const CROCHESS_TESTS_HISTORY_FILE_NAME[] = "history_tests.txt";
Expand Down

0 comments on commit 3f6f147

Please sign in to comment.