Skip to content
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

Add convert_move_to_user_inputs(g, move) #64

Open
richelbilderbeek opened this issue Dec 30, 2022 · 0 comments
Open

Add convert_move_to_user_inputs(g, move) #64

richelbilderbeek opened this issue Dec 30, 2022 · 0 comments

Comments

@richelbilderbeek
Copy link
Owner

richelbilderbeek commented Dec 30, 2022

Currently (and as part of #22) the game has instantaneous replay that does not check the UI:

void replayer::do_move(game& g)
{
  // ...
  const auto& move{m_replay.get_moves().at(move_index)};
  g.do_move(move);
  // ...
}

The replayer should use the UI:

void replayer::do_move(game& g)
{
  // ...
  const auto& move{m_replay.get_moves().at(move_index)};
  const user_input input{convert_move_to_user_input(g, move)};
  g.add_user_input(input);
  // ...
}
richelbilderbeek pushed a commit that referenced this issue Dec 30, 2022
richelbilderbeek pushed a commit that referenced this issue Dec 30, 2022
@richelbilderbeek richelbilderbeek changed the title Add convert_move_to_user_input(g, move) Add convert_move_to_user_inputs(g, move) Dec 30, 2022
richelbilderbeek pushed a commit that referenced this issue Dec 30, 2022
richelbilderbeek pushed a commit that referenced this issue Dec 30, 2022
richelbilderbeek pushed a commit that referenced this issue Dec 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant