-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
implementation of methods to examination of the game #5
base: master
Are you sure you want to change the base?
Conversation
Hi, thanks for your work. I seriously think that we may add to many complexity in the
|
Hi, thanks for your review! I totally agree with your opinion. I have imagined that once new branch is started by On the other hand, I found that you start a new project. Many thanks! |
I got your idea. I'm sorry for misunderstanding what you want to say. (And, as you say, implementation of So, could you give me an advice?
|
As you want ! for the moment I don't know how to properly implement this idea (a Tree or a Vec<Rc>...). If you have an idea we can discuss it. However if you want to implement the sgf_export for ps: I discovered some bugs in the lib so stay updated. |
Thank you for your reply. Many thanks! |
What has been added
goban::rules::game::Game::move_num
goban::rules::game::Game::moves_history
// Record of stone moves (not record goban states or other parameters)goban::rules::game::Game::initialize()
goban::rules::game::Game::update_moves_history()
goban::rules::game::Game::load_by_movenum
goban::rules::game::Game::move_backward()
goban::rules::game::Game::move_forward()
Purpose
I think it is beneficial for users if
goban::pieces::goban::Goban
is updatable along the history, because go-players often examine their games by repeatably moving backward, forward, or making a new branch from a certain point.Newly-added methods allow library users to freely move in the game history and start new game branch,
Both
move_backward()
andmove_forward()
updategoban::pieces::goban::Goban
, but do not updatemoves_history
.When users use
goban::rules::game::Game::play(play)
, themoves_history
will be updated. Therefore, the users can start newly branched game, like below:Points to be discussed
goban::rules::game::Game::history
andgoban::rules::game::Game::moves_history
may be not smart. However, (in my understanding)goban::rules::game::Game::history
contains only goban states, not all game states (like prisoners or ko-point). Therefore, it is not suitable for the above-mentioned purpose.moves_history
, we have an option to recordgoban::rules::game::Game
directly. Maybe the former is more memory-efficient, and the later is more CPU-efficient. Which do you think better?goban::rules::game::Game::__play__
......