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

Allow custom komi to be specified on demo boards #2501

Closed
dexonsmith opened this issue Jan 17, 2024 · 0 comments · Fixed by #2515
Closed

Allow custom komi to be specified on demo boards #2501

dexonsmith opened this issue Jan 17, 2024 · 0 comments · Fixed by #2515
Assignees

Comments

@dexonsmith
Copy link
Contributor

See forum post: https://forums.online-go.com/t/request-custom-komi-for-demo-board/39065

Komi cannot be chosen when making a demo board. The default komi of the chosen ruleset is used and cannot be edited later. But what if, for instance, I wanted to create a review of an old game that used 0 komi?

@dexonsmith dexonsmith self-assigned this Jan 17, 2024
dexonsmith added a commit to dexonsmith/online-go.com that referenced this issue Jan 23, 2024
The board settings for a challenge/demo modal are stored in three places in the
state object:

- `state.conf`
- `state.demo` (demo boards)
- `state.challenge.game` (others)

Now, most accessors/modifiers of game state select between `challenge.game` and
`demo` using either `gameState()`, `gameStateOf()`, or `gameStateName()`.

Previously, some of the demo settings were stored temporarily in
`challenge.game` and copied over to `demo`, while others were already split.

This clean-up means that:

- The saved settings in "demo" and "challenge.game" are now independent.
  Previously, some were independent and others were not.
    - "Create Demo" remembers the last demo you made.
    - "Create Challenge" remembers the last challenge you made.
- Rendering code can (still) be easily shared.

With this in place, it will be straightforward to allow users to select
handicap and komi for demo boards.

Relates to online-go#2501.
dexonsmith added a commit to dexonsmith/online-go.com that referenced this issue Jan 23, 2024
The board settings for a challenge/demo modal are stored in three places in the
state object:

- `state.conf`
- `state.demo` (demo boards)
- `state.challenge.game` (others)

Now, most accessors/modifiers of game state select between `challenge.game` and
`demo` using either `gameState()`, `gameStateOf()`, or `gameStateName()`.

Previously, some of the demo settings were stored temporarily in
`challenge.game` and copied over to `demo`, while others were already split.

This clean-up means that:

- The saved settings in "demo" and "challenge.game" are now independent.
  Previously, some were independent and others were not.
    - "Create Demo" remembers the last demo you made.
    - "Create Challenge" remembers the last challenge you made.
- Rendering code can (still) be easily shared.

With this in place, it will be straightforward to allow users to select
handicap and komi for demo boards.

Relates to online-go#2501.
dexonsmith added a commit to dexonsmith/online-go.com that referenced this issue Jan 25, 2024
Add ability to specify a custom komi for demo games.

Depends on online-go#2513 (refactor) and <online-go/ogs#1912>
(backend fix).

Fixes online-go#2501.
dexonsmith added a commit to dexonsmith/online-go.com that referenced this issue Jan 25, 2024
Add ability to specify a custom komi for demo games.

Fixes online-go#2501.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant