movetree fix

This commit is contained in:
Sander Land committed 2020-11-15 18:41:48 +01:00
1 parent d220c99454
commit a485968696
3 files changed
+14 -10

No files matched your search

+8 -7
View File
@@ -3,7 +3,7 @@ from collections import defaultdict
from kivy.graphics.context_instructions import Color
from kivy.graphics.vertex_instructions import Line, Rectangle
from kivy.lang import Builder
from kivy.properties import ObjectProperty, Clock, NumericProperty, BooleanProperty
from kivy.properties import BooleanProperty, Clock, NumericProperty, ObjectProperty
from kivy.uix.dropdown import DropDown
from kivy.uix.scrollview import ScrollView
from kivy.uix.widget import Widget
@@ -11,15 +11,15 @@ from kivymd.app import MDApp
from katrain.gui.kivyutils import BackgroundMixin, draw_circle, draw_text
from katrain.gui.style import (
WHITE,
STONE_COLORS,
LIGHTGREY,
BACKGROUND_COLOR,
OUTLINE_COLORS,
LIGHTER_BACKGROUND_COLOR,
YELLOW,
STONE_TEXT_COLORS,
LIGHTGREY,
OUTLINE_COLORS,
RED,
STONE_COLORS,
STONE_TEXT_COLORS,
WHITE,
YELLOW,
)
@@ -120,6 +120,7 @@ class MoveTreeCanvas(Widget):
stack = root.ordered_children[::-1]
next_y_pos = defaultdict(int) # x pos -> max y pos
children = defaultdict(list) # since AI self-play etc may modify the tree between layout and draw!
children[root] = root.ordered_children
while stack:
move = stack.pop()
x = move.depth
+1 -1
View File
@@ -4,7 +4,7 @@ Cython==0.29.14
dataclasses==0.6
docutils==0.16
idna==2.10
Kivy==2.0.0rc2
Kivy>=2.0.0rc2
Kivy-Garden==0.1.4
kivymd==0.104.1
Pillow==7.2.0
+5 -2
View File
@@ -41,16 +41,19 @@ setup(
install_requires=[
"wheel",
"setuptools",
"urllib3",
"importlib_resources ;python_version<'3.7'",
"pygame;platform_system=='Darwin'", # some mac versions need this for kivy
"cython>=0.24,<=0.29.14,!=0.27,!=0.27.2", # kivy wants this
"kivy==2.0.0rc2;platform_system=='Darwin'", # rc3 failing on mac
"kivy>=2.0.0rc4;platform_system!='Darwin'", # just use the latest on linux?
"pygame;platform_system=='Darwin'", # some mac versions need this for kivy
"kivy_deps.glew;platform_system=='Windows'",
"kivy_deps.sdl2;platform_system=='Windows'",
"kivy_deps.gstreamer;platform_system=='Windows'",
"kivy==2.0.0rc2", # rc3 failing on mac
"kivymd>=0.104.1",
"screeninfo;platform_system!='Darwin'", # for screen resolution, has problems on macos
],
dependency_links=["https://kivy.org/downloads/simple/"],
python_requires=">=3.6, <4",
entry_points={"console_scripts": ["katrain=katrain.__main__:run_app"]},
classifiers=[