Commit Graph

2222 Commits

Author SHA1 Message Date
Calcitem d382d84817
msvc: Upgrade to Qt 5.15.2 2021-10-23 11:29:28 +08:00
Calcitem 529ac8b493
.gitignore: Ignore all jks files 2021-10-17 10:23:39 +08:00
Calcitem 98244e0a04
lint: Fix invariant booleans
info: Conditions should not unconditionally evaluate to `true` or
to `false`. verify: pieceToRemoveCount <= 0.
(invariant_booleans at [sanmill] lib/mill/position.dart:675)
2021-10-16 13:35:02 +08:00
Calcitem 8d2afa2a5d
lint: Fix invalid assignment
Fix error: A value of type 'dynamic' can't be assigned to a variable
of type 'int'.
(invalid_assignment at [sanmill] lib/shared/picker.dart:76)
2021-10-16 13:32:41 +08:00
Calcitem 4df5dcd96d
build: Support Flutter 2.5.3 2021-10-16 12:06:04 +08:00
Calcitem f3a77965cb
build: Support Flutter 2.5.2 2021-10-16 11:26:20 +08:00
Calcitem 163d9b1e90
authors: Add Nikolas Rimikis to the authors list 2021-10-11 02:16:04 +08:00
Calcitem e7f7b6cf6f
Merge remote-tracking branch 'Leptopoda/linting' 2021-10-11 02:08:16 +08:00
Leptopoda 755e75231d
fix sound on game navigation
Effectively rewriting the entire audio stack

- propperly await futures
- only play sound once on take play back
 
Further testing is needed but as we await the autio play we should be able to remove the stopPlay now. 

fix late init problem
2021-10-10 20:02:59 +02:00
Calcitem b04a0bb40f
Merge remote-tracking branch 'Leptopoda/linting'
* Enabled strict linting.
* Fix all the linting errors and disabled the rules that needed to much
  restructure.
* Restructured the files.

Known Issues:

* Tap drawer menu item will get an exception when AI is thinking
Change difficulty level to 30, thinking time to 60, select AI Vs. AI and
tap Start Game, and tap on the settings in the drawer menu get the
exception:
This widget has been unmounted, so the State no longer has a context
(and should be considered defunct).

* Sound problem
when this option is enabled, it does not take effect:
  Preferences -> Sound effects -> Keep mute when taking back
The sound issue is related to some async not being
appropriately handled. This leads to the game_page setting Audios.
isTemporaryMute to false before Audios evaluated the value.
This leads to the sound being played. Some out-of-order execution.
It seems to be a thing with the code in general that Futures aren't
really awaited. This will be quite some stuff to do and check later.

* Performance
Performance testing has not yet been conducted.
2021-10-11 01:44:41 +08:00
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
Calcitem 146ac77462
Indonesian: Change app name from Pabrik to Mill 2021-10-10 07:47:27 +08:00
Calcitem 3e388136e4 Update intl_id.arb (POEditor.com) 2021-10-10 07:42:43 +08: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 a5dfe514f2
Sanmill v1.1.38 (2196)
Official release version of Sanmill v1.1.38

Signed-off-by: Calcitem <calcitem@outlook.com>
2021-10-05 00:33:27 +08:00
Calcitem 351b79b7bf
i10n: Improve translations 2021-10-04 23:47:31 +08:00
Calcitem c6ab8791da
settings: Allow to set Point style and Point width
Point style only supports None and Solid, not supports Hollow yet.
2021-10-04 21:36:13 +08:00
Calcitem fb639a1e4c
Draw point on the game board 2021-10-04 20:21:07 +08: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