swap wip
This commit is contained in:
1 parent
033cf29a25
commit
c3eff3f0f5
4 files changed
+9
-2
No files matched your search
+2
-2
@@ -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.
|
||||
|
||||
|
||||
@@ -853,6 +853,8 @@
|
||||
height: (self.parent.item_height or 50) * 5
|
||||
|
||||
|
||||
|
||||
|
||||
<HamburgerMenuContents@MDBoxLayout+BackgroundMixin>:
|
||||
katrain: app.gui
|
||||
player_setup: player_setup
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 7.3 KiB |
Reference in new issue
Block a user