added sodoku game first draft

This commit is contained in:
2023-04-28 15:25:03 +02:00
parent 3772fbb843
commit 07d3f5388e
10 changed files with 8 additions and 8 deletions

View File

@@ -20,8 +20,8 @@ class Sodoku(GameBase):
self.colors = [1, 2, 3, 4, 5, 6, 7, 8, 9]
self.offset_left = 860
self.offset_down = 180
self.offset_left = 840
self.offset_down = 130
self.fill_data_coordinates()
@@ -37,10 +37,10 @@ class Sodoku(GameBase):
}
def fill_data_coordinates(self):
# 860 to 1690 = 830 - 40 / 9 = 88
# 180 to 1010 = 830 - 40 / 9 = 88
# 840 to 1720 = 880 - 40 / 9 = 93
# 130 to 1010 = 880 - 40 / 9 = 93
# spacing 2 * 20
dim = 88
dim = 93
e_spacing = 0
i_spacing = 0
for e in range(0, 9, 1):
@@ -74,7 +74,7 @@ class Sodoku(GameBase):
# cv.waitKey(500)
screenshot = self.capture_window.get_screenshot()
screenshot = screenshot[180:1010, 860:1690]
screenshot = screenshot[130:1010, 840:1720]
#cv.imshow("screenshot", screenshot)
#cv.waitKey(150)
@@ -138,8 +138,8 @@ class Sodoku(GameBase):
click_pt = self.get_click_point(self.data_coordinates[e, i])
self.dig_point(click_pt[0] + self.offset_left, click_pt[1] + self.offset_down, 100)
y = 1100
x = 880 + ((color - 1) * 100) # +100
y = 1120
x = 850 + ((color - 1) * 110) # +100
self.dig_point(x, y, 100)
def is_empty_pieces_in_state(self, state):

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1015 B

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB