Commit Graph

2206 Commits

Author SHA1 Message Date
Leptopoda c029bf39d0
game board cleanup
removes some unneded code and better utilizes null safety
2021-10-10 12:05:15 +02:00
Leptopoda 8727dc2a87
restructure
- move list_item_divider into lib/shared
- move lib/engine into lib/services/engine

unify Import style

- I've unified the way files are imported. We now use absolute imports everywhere.

This is not a must but I find it more usefull.

cleanup imports

- prefer using part files where needed
2021-10-10 11:54:46 +02:00
Leptopoda 339af39579
Externalize GamePageToolBar widget 2021-10-10 11:54:38 +02:00
Leptopoda 53ddb55b04
restructure drawer
cleanup the drawer code.

- fixes the drawer design

Home drawer performance improvements

As the child doesn't depend on the transformation we shouldn't repaint it => better performance
2021-10-10 11:48:16 +02:00
Leptopoda 961aa6241b
fix some stuff
- remove unnecessary containers
- bump linting version in pubspec.yml
- make `isLargeScreen` and `isSmallScreen` a geter
- add decimal points to double values
- remove unused SizedBox
- use const constructor where possible
- remove residual code
- fix help_screen AppBar
- Fix historyNavToolbar padding

fix styling of drawer
- fix the padding of the drawer elements.


cleanup settings
- removes unused properties
- fixes ListItemDivider height
2021-10-10 11:17:11 +02:00
Leptopoda 418d1cfb44
cleanup boilerplate code 2021-10-10 11:09:29 +02:00
Leptopoda ab97c71188
restructure files and renable theming
- change file structure
- fixes the personalication/theme to not be static anymore
2021-10-10 11:08:57 +02:00
Leptopoda ef6c7a2176
cleanup widget tree
removes some redundant widgets that aren't displayed or diplicated
2021-10-10 11:08:06 +02:00
Leptopoda 26b7f49a8e
cleanup code
Also makes some Widgets stateless (resulting in performance improvements)
2021-10-10 11:07:56 +02:00
Leptopoda 6c0dd46f05
fix a ton of linting
Most notably:
- require_trailing_commas
- prefer_const_constructors
- type_annotate_public_apis
-  always_declare_return_types
- prefer_foreach
- use_string_buffers
- join_return_with_assignment

For now disabled rules:
- avoid_positional_boolean_parameters
- constant_identifier_names
- avoid_escaping_inner_quotes
- use_build_context_synchronously
Those lint rules are going to be disabled for now as they require massive restructure and logic change of the current codebase
Already fixed:
- avoid_print (previous commit)
2021-10-10 11:06:16 +02:00
Leptopoda 33966c9bb2
replace print() with debugPrint()
fixes this int rule
- avoid_print (previous commit)

format files
2021-10-08 19:54:01 +02:00
Leptopoda 5397d4ff14
auto format on save for vsCode
this enables vscode to auto format files in the flutter project.
Also fixes a formatting error

enable formatting only for dart files


format settings.json
2021-10-08 19:53:01 +02:00
Leptopoda bb31257cc3
add linting and fix pubspec.yml 2021-10-08 15:42:27 +02:00
Calcitem ac98b7e12b
Add tips of continueToMakeMove 2021-10-04 19:22:56 +08:00
Calcitem bab7380963
rule: Support Threefold repetition setting 2021-10-04 17:57:24 +08:00
Calcitem 04abced830
Support import GoldToken move list
See: https://www.goldtoken.com
2021-10-04 17:57:24 +08:00
Calcitem e4ba8f3df9
i10n: improve Farsi translation of removeUnplacedPiece 2021-10-04 17:57:23 +08:00
Calcitem 6c78b9fbff
rule: Modify the judgment condition of N-move rule from 'greater than' to 'greater than or equal to' 2021-10-04 17:57:23 +08:00
Calcitem 9b16a5955d
rule: Support Endgame N-Move rule
TODO: Translation
2021-10-04 17:57:22 +08:00
Calcitem 02569ae563
rule: Add 60 option to N-move rule 2021-10-04 17:57:22 +08:00
Calcitem 74f098043d
rule: Support removing unplaced piece
If a player forms the mill in the placing phase, she will remove
the opponent's unplaced piece and continue to make a move.
2021-10-04 17:57:21 +08:00
Calcitem 9bbb0d3b29
Sanmill v1.1.37 (2184)
Official release version of Sanmill v1.1.37

Signed-off-by: Calcitem <calcitem@outlook.com>
2021-09-26 22:14:45 +08:00
Calcitem 2b1237319f
Change the icon of the game over 2021-09-26 22:12:06 +08:00
Calcitem 410275ba57
Sanmill v1.1.36 (2182)
Official release version of Sanmill v1.1.36

Signed-off-by: Calcitem <calcitem@outlook.com>
2021-09-25 20:03:03 +08:00
Calcitem 0e832a2c23
Fix #281: Arrow icons direction is wrong in Right-to-Left layout 2021-09-25 19:13:36 +08:00
Calcitem b36646e165 Update intl_ar.arb (POEditor.com) 2021-09-25 18:59:52 +08:00
Calcitem b2d4b7c78f Update intl_ar.arb (POEditor.com) 2021-09-25 01:48:27 +08:00
Calcitem 38557a7b7e
Sanmill v1.1.35 (2178)
Official release version of Sanmill v1.1.35

Signed-off-by: Calcitem <calcitem@outlook.com>
2021-09-21 23:50:28 +08:00
Calcitem eca0d09347
Fix pieces count display is incorrect when opening app if piece count is not 9 2021-09-21 23:41:45 +08:00
Calcitem fa54876abf
Add trailing string to skill level settings but not enabled 2021-09-21 23:40:37 +08:00
Calcitem 8ee7bd360a
depth: Limit white 6th move thinking depth to less than 5
Fix 0e8ab57b18

 1.     f4    d6
 2.     d2    b4
 3.     c4    d1
 4.     d7    d3
 5.     e4    g4

White:
3 d5 X 39
5 a7 OK

c37bd7cc74 said:
From test result we can known that 3/5/7/8 is OK.

0e8ab57b18 said:

Now, For this game:

 1.     b4    d2
 2.     f4    d6
 3.     d1    d5
 4.     d7    c4
 5.     g4    e4

5 and 7 is bad move.

Only choose 3, White place at a4/d3 (D).

But, if apply 6e547e162b,

 1.     b4    d2
 2.     f4    d6
 3.     d1    d5
 4.     d7    c4

White's 5th will not do g4 to attack. So ignore it.
2021-09-21 18:43:26 +08:00
Calcitem f7714d4535
depth: Limit black 5th move thinking depth to less than 3
1.     d6    d2
2.     b4    f4
3.     e4    c4
4.     d1    g4
5.     a1

Black
bad a4 (47)

1 X
2 X
3+ OK

Can fit Commit b65d513678

Black:
Bad move: f6
Good move: c5 / b4 / d3 / d2 / e3

1.     d1    d6
2.     c4    f4
3.     g7    d7
4.     d5    g4
5.     e4

3 OK
4 X
5 D or 65
6+ X

BTW:

Commit ff37bc3310

 1.     d6    f4
 2.     b4    d2
 3.     b6    f6
 4.     b2xf6    f6
 5.     d7

Actually,  d7 is bad move.
So we do not need to consider this case.
2021-09-21 14:54:07 +08:00
Calcitem 0e8ab57b18
depth: Limit white 6th move thinking depth to less than 3
c37bd7cc74
Limit white 6th move thinking depth to less than 8
From test result we can known that 3/5/7/8 is OK.

But if set to 8, for this game:

 1.     f4    d2
 2.     b4    d6
 3.     d7    e4
 4.     d3    g4
 5.     a4    c4

White will place at a7 which will lost in 45.
If change to 3/5/7, sometimes place at d5(D), sometimes place at d1(49).

So it's better than 8. Not perfect.

We choose 7.

Now, For this game:

 1.     b4    d2
 2.     f4    d6
 3.     d1    d5
 4.     d7    c4
 5.     g4    e4

5 and 7 is bad move.

Only choose 3, White place at a4/d3 (D).
2021-09-21 13:41:44 +08:00
Calcitem 87e7314533
Sanmill v1.1.34 (2172)
Official release version of Sanmill v1.1.34

Signed-off-by: Calcitem <calcitem@outlook.com>
2021-09-21 02:26:17 +08:00
Calcitem 6e547e162b
depth: Limit white 5th move thinking depth to less than 5
Case 1:

1.     d6    f4
2.     b4    d2
3.     d3    d7
4.     d1    g4

White b6 is bad (29)

1-6 OK
7 X
8 OK
9 X
10 OK
11 X
12+ OK

Case 2:

1.     b4    f4
2.     d2    d6
3.     g4    d1
4.     d7    b2

1 OK
2 OK
3 OK
4 X 47
5 OK
6 X 47
7 OK
8 X 47
9 OK
10 X 47
11 X 57
12 X 47
13-16 X 57 half
17 X 57
18+ OK

Case 3:

1. d6 f4
2. d2 b4
3. g4 d7
4. a4 d1

5 50% X (73, acceptable)

Case 4:

b0d8255aad said:

As long as the depth of White's 5th move is >= 5, there will maybe no bad move.
So it is not conflict.
2021-09-21 02:09:24 +08:00
Calcitem e392d98f10
depth: Only use user's setting when DrawOnHumanExperience is on
DrawOnHumanExperience is not related with mobility.
2021-09-21 00:17:39 +08:00
Calcitem 1827f89051
depth: Limit white 6th move thinking depth to less than 7
c37bd7cc74
Limit white 6th move thinking depth to less than 8
From test result we can known that 3/5/7/8 is OK.

But if set to 8, for this game:

 1.     f4    d2
 2.     b4    d6
 3.     d7    e4
 4.     d3    g4
 5.     a4    c4

White will place at a7 which will lost in 45.
If change to 3/5/7, sometimes place at d5(D), sometimes place at d1(49).

So it's better than 8. Not perfect.

We choose 7.
2021-09-20 23:46:39 +08:00
Calcitem b0d8255aad
depth: Limit white 4th move thinking depth to less than 3
White:
Bad move: a4 (Draw, but next black will do c4, and then white cannot do c5)
Good move: c5

 1.     b4    f4
 2.     d2    d6
 3.     d7    d3

White Depth 1-3 will do e4 or g4.
The strategy is defensive rather than offensive.

As long as the depth of White's 5th move is >= 5, there will maybe no bad move.
2021-09-20 22:31:53 +08:00
Calcitem 8ac13d061e
Sanmill v1.1.33 (2167)
Official release version of Sanmill v1.1.33

Signed-off-by: Calcitem <calcitem@outlook.com>
2021-09-20 18:41:03 +08:00
Calcitem 1885a59eb5
Update flutter packages dependencies 2021-09-20 16:45:09 +08:00
Calcitem e4e7bff14b
build: Support Flutter 2.5.1 2021-09-20 15:36:19 +08:00
Calcitem 1f9ea8a35f
Sanmill v1.1.32 (2164)
Official release version of Sanmill v1.1.32

Signed-off-by: Calcitem <calcitem@outlook.com>
2021-09-20 01:18:46 +08:00
Calcitem 8dddc79250
settings: Add Algorithm settings 2021-09-20 01:06:50 +08:00
Calcitem e4c774eafc
i10n: Add string of "Algorithm" 2021-09-19 22:04:10 +08:00
Calcitem 9b6c096cb4
l10n: Add append.sh 2021-09-19 22:03:36 +08:00
Calcitem 82e44da06f
Sanmill v1.1.31 (2160)
Official release version of Sanmill v1.1.31

Signed-off-by: Calcitem <calcitem@outlook.com>
2021-09-18 01:07:34 +08:00
Calcitem 4b3dca10d0
depth: 9mm and 12mm using separate placing depth tables
To improve Twelve Men's Morris power.
2021-09-18 00:28:13 +08:00
Calcitem 38bbf52c15
depth: Limit black 3rd move thinking depth to less than 3
For this move list:

 1.     b4    f4
 2.     d6    d2
 3.     b6    b2
 4.     f6xb2    b2
 5.     c5

Black:
Bad move:  f2xb4 (lost in 39)
Good move: f2xc5/ or no mill

(From so_gewinnt_man_muehle)

We cannot stop black to do bad move at 5th.
So we try to stop black to do b2 at 4th.
Through change black's 3rd move depth to 3,
Black will do d7/d5/a4/c4.

This commit is not conflict with
"depth: Limit 6th and 7th move depth to 15"
(fefa064cb9)

Test result:
If change depth to less than 2 (not 3), played 600-800 games.
Before change:
20% : 32% : 48%
After change:
17% : 43% : 39%
2021-09-18 00:18:03 +08:00
Calcitem 438380d1b3
depth: Remove unnecessary setting depth to 3 when move index is 4 getDrawOnHumanExperience is on
Because placingDepthTable[4] == 3.
2021-09-17 23:24:09 +08:00
Calcitem 4645bf4054
Sanmill v1.1.30 (2156)
Official release version of Sanmill v1.1.30

Signed-off-by: Calcitem <calcitem@outlook.com>
2021-09-15 01:01:35 +08:00