khetai 0.2.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +5 -2
- data/ext/khetai/dev/fltk-ui/ai_loader.cpp +5 -0
- data/ext/khetai/dev/fltk-ui/ai_loader.h +1 -0
- data/ext/khetai/dev/fltk-ui/game_board_util.cpp +2 -0
- data/ext/khetai/khetai_lib.c +1 -0
- data/lib/khetai/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d169f4a004e24dd36c20cc0483e97089288c37d9a883102902e57ad90b9da52c
|
4
|
+
data.tar.gz: 4220a784bde8231944b7cd856839f651c7b7d0491748e6597a1d6a94c58c468d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 74a55ef185db9d73c58e9e148a3e124f5850da6304be611d7466d8951e43b6d3165e9fbf5ae98654c12861a49e3281bf6a299f03f0b55e9d63ee51c6b76d2793
|
7
|
+
data.tar.gz: 6409ac627699d0daa5a7cacb4ce1da174be6f433228466b7cd0ffd04e7c47d9830f11de41e629313b38b776dd7a41647aa82e405f49dc18d69e03f23a14a8f65
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -51,16 +51,19 @@ The internals of the gem are written in C, located in `ext/khetai`.
|
|
51
51
|
$ bundle exec rake build
|
52
52
|
$ gem install pkg/khetai-<version>.gem
|
53
53
|
|
54
|
-
Once tested and verified, bump the version number in `lib/khetai/version.rb`
|
54
|
+
Once tested and verified, bump the version number in `lib/khetai/version.rb` and commit changes.
|
55
55
|
|
56
56
|
To release and push to rubygems.org:
|
57
57
|
|
58
58
|
$ bundle exec rake release
|
59
|
+
|
60
|
+
To push a pre-built gem manually:
|
61
|
+
|
59
62
|
$ gem push pkg/<gem>
|
60
63
|
|
61
64
|
## Manual Testing
|
62
65
|
|
63
|
-
There is a GUI test harness written in C++ using FLTK available in the
|
66
|
+
There is a GUI test harness written in C++ using FLTK available in the [ext/khetai/dev/fltk-ui](/ext/khetai/dev/fltk-ui) directory.
|
64
67
|
|
65
68
|
### Why does this exist?
|
66
69
|
|
@@ -52,6 +52,11 @@ void (*AILoader::get_init_zobrist())()
|
|
52
52
|
return reinterpret_cast<void (*)()>(get_symbol("init_zobrist"));
|
53
53
|
}
|
54
54
|
|
55
|
+
void (*AILoader::get_reset_undo())()
|
56
|
+
{
|
57
|
+
return reinterpret_cast<void (*)()>(get_symbol("reset_undo"));
|
58
|
+
}
|
59
|
+
|
55
60
|
void (*AILoader::get_setup_board())(char **)
|
56
61
|
{
|
57
62
|
return reinterpret_cast<void (*)(char **)>(get_symbol("setup_board"));
|
@@ -54,6 +54,7 @@ void free_c_array(char **c_array, size_t size)
|
|
54
54
|
Move call_ai_move(AILoader &ai_loader, const std::vector<std::vector<std::string>> &board_pieces, Player player, int max_depth, int max_time)
|
55
55
|
{
|
56
56
|
auto init_zobrist = ai_loader.get_init_zobrist();
|
57
|
+
auto reset_undo = ai_loader.get_reset_undo();
|
57
58
|
auto setup_board = ai_loader.get_setup_board();
|
58
59
|
auto print_board = ai_loader.get_print_board();
|
59
60
|
auto set_time_parameters = ai_loader.get_set_time_parameters();
|
@@ -65,6 +66,7 @@ Move call_ai_move(AILoader &ai_loader, const std::vector<std::vector<std::string
|
|
65
66
|
|
66
67
|
char **c_board = vector_to_c_array(flatten_2d_vector_with_buffer(board_pieces));
|
67
68
|
|
69
|
+
reset_undo();
|
68
70
|
init_zobrist();
|
69
71
|
srand((unsigned)time(NULL));
|
70
72
|
|
data/ext/khetai/khetai_lib.c
CHANGED
data/lib/khetai/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: khetai
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- jkugs
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-11-
|
11
|
+
date: 2024-11-05 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description:
|
14
14
|
email:
|