diff --git a/INSTALL.md b/INSTALL.md index b7f5ea2..a0e882c 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -36,10 +36,10 @@ * Run the command `git clone https://github.com/sanderland/katrain.git` to download the repository. * Changing directory using `cd katrain` * Run the command `pip3 install .` to install the package globally, or use `--user` to install locally, then run the program by typing `katrain` in the terminal. - * If you prefer not to install, run without installing using `python3 -m katrain` + * If you prefer not to install, run without installing using `python3 -m katrain` after installing the kivy dependencies mentioned in the next section. * A binary for KataGo is included, but if you have compiled your own, point the 'engine/katago' setting to the relevant KataGo v1.4+ binary. -## Troubleshooting +## Troubleshooting Older linux machines may have trouble installing, you can try to manually install dependencies to resolve some issues. diff --git a/katrain/gui.kv b/katrain/gui.kv index e06bfe7..925aa90 100644 --- a/katrain/gui.kv +++ b/katrain/gui.kv @@ -853,6 +853,8 @@ height: (self.parent.item_height or 50) * 5 + + : katrain: app.gui player_setup: player_setup diff --git a/katrain/gui/kivyutils.py b/katrain/gui/kivyutils.py index b929c67..0d0a6cd 100644 --- a/katrain/gui/kivyutils.py +++ b/katrain/gui/kivyutils.py @@ -283,6 +283,11 @@ class PlayerSetupBlock(MDBoxLayout): self.add_widget(self.white) PlayerSetupBlock.INSTANCES.append(self) + def swap_players(self): + player_dump = {bw: p.player_type_dump for bw,p in self.players.items()} + for bw in 'BW': + self.update_players(bw,player_dump['B' if bw=='W' else 'W']) + def update_players(self, bw, player_info): # update sub widget based on gui state change self.players[bw].update_widget(player_type=player_info.player_type, player_subtype=player_info.player_subtype) diff --git a/katrain/img/swap.png b/katrain/img/swap.png new file mode 100644 index 0000000..830fb67 Binary files /dev/null and b/katrain/img/swap.png differ