This commit is contained in:
Sander Land committed 2020-06-12 15:57:26 +02:00
1 parent 033cf29a25
commit c3eff3f0f5
4 files changed
+9 -2

No files matched your search

+2 -2
View File
@@ -36,10 +36,10 @@
* Run the command `git clone https://github.com/sanderland/katrain.git` to download the repository. * Run the command `git clone https://github.com/sanderland/katrain.git` to download the repository.
* Changing directory using `cd katrain` * 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. * 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. * 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. Older linux machines may have trouble installing, you can try to manually install dependencies to resolve some issues.
+2
View File
@@ -853,6 +853,8 @@
height: (self.parent.item_height or 50) * 5 height: (self.parent.item_height or 50) * 5
<HamburgerMenuContents@MDBoxLayout+BackgroundMixin>: <HamburgerMenuContents@MDBoxLayout+BackgroundMixin>:
katrain: app.gui katrain: app.gui
player_setup: player_setup player_setup: player_setup
+5
View File
@@ -283,6 +283,11 @@ class PlayerSetupBlock(MDBoxLayout):
self.add_widget(self.white) self.add_widget(self.white)
PlayerSetupBlock.INSTANCES.append(self) 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 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) self.players[bw].update_widget(player_type=player_info.player_type, player_subtype=player_info.player_subtype)
Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB