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

fix: handle non-zero startpoints in PlayManager#createPlay() #293

Merged
merged 3 commits into from
Sep 8, 2021

Conversation

xnv
Copy link
Member

@xnv xnv commented Sep 6, 2021

掲題どおり。

第 0 startPoint 以外の start point が無視されていたのを修正します。
テストがなかったので加えます。

@xnv xnv added the bug Something isn't working label Sep 6, 2021
@xnv xnv requested review from kamakiri01 and yu-ogi September 6, 2021 11:02
Comment on lines -89 to 91
setTickList(tickList: TickList): void {
setTickList(tickList: TickList | null): void {
this.store.setTickList(tickList);
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • このメソッドはなくしていいような気もしますが、 PlayManager 経由でこのクラスは外部に露出するようなので破壊的変更を避けています。
  • null を許容しているのは型上のつじつま合わせですが、空にリセットする能力を持つことはは変ではないはず。

this.store.setTickList(tickList);
}

setDumpedPlaylog(dumped: DumpedPlaylog): void {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • setTickList との対称を考えると setStartPoints の方が座りがいいかもしれませんが、そもそも独立に扱うことの方が奇妙 (tickList を維持したまま startPoints だけ設定するようなケースがあるとは思えない) ので、 DumpedPlaylog を受けています。
  • 名前の座りが悪いんですが、たとえば reset() では誇張があり (authenticate の状況などはリセットされない) 採用できませんでした。

@xnv xnv merged commit 9a9c704 into master Sep 8, 2021
@xnv xnv deleted the set-dumped-log branch September 8, 2021 09:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants