Commit Graph

852 Commits

Author SHA1 Message Date
Peter Osterlund
b86e7d31f7 Remove vibration when opening board context menu 2019-08-31 23:20:10 +02:00
Peter Osterlund
4230847224 Remove unneeded code from buildSrc 2019-08-11 11:40:31 +02:00
Peter Osterlund
2a01797dfa Use android.util.Pair
Use the Android builtin Pair class instead of a DroidFish specific
class that does the same thing.
2019-08-10 23:38:17 +02:00
Peter Osterlund
6c4ff122ac Handle IllegalArgumentException thrown from openInputStream() 2019-08-10 18:10:14 +02:00
Peter Osterlund
7c4f43c156 Don't try to draw chess pieces with size 0
Trying to create a 0 size bitmap fails with IllegalArgumentException.
2019-07-28 09:24:13 +02:00
Peter Osterlund
6a9af8206b Prevent crash if engine produces an invalid PV
If an engine produces an invalid PV during analysis and the "add
analysis" function is used to add the PV to the game tree, the app
could crash. Fixed this by ignoring the invalid PV move and any
following moves in the PV.
2019-07-25 13:34:26 +02:00
Peter Osterlund
6c6db65f18 Change version to 1.76 2019-07-21 08:59:37 +02:00
Peter Osterlund
9efe811d12 Revert "Use SwitchPreference"
Change back to using CheckBoxPreference instead of SwitchPreference in
DroidFish. In Android 4.x the switch can be so big that the text does
not fit, since it uses on/off texts for the switch, and those texts
are translated. Russian language is known to be affected.

See a03e64af6d
2019-07-21 02:27:36 +02:00
Peter Osterlund
5be49388c1 Change version to 1.75 2019-07-20 10:59:44 +02:00
Peter Osterlund
f463990029 Fix potential NPE in startup guide
DroidFish.reInitUI() could potentially set tourGuide to null while tap
events are already queued but not yet processed. Avoid NPE in this
situation.
2019-07-20 08:42:19 +02:00
Peter Osterlund
0dd276ba22 Fix potential crash when sharing an image of the board
DroidFish.shareImage() can theoretically be called before the chess
board widget measurement has been finished, which would crash the
app.
2019-07-20 08:42:10 +02:00
Peter Osterlund
4411b7f8b6 Make changing languages work in Android 9
Based on information from:

https://proandroiddev.com/change-language-programmatically-at-runtime-on-android-5e6bc15c758
2019-07-19 21:37:53 +02:00
Peter Osterlund
ddf5209109 Remove unnecessary exception declarations 2019-07-19 20:36:36 +02:00
Peter Osterlund
eed9d1a76a Remove unused imports 2019-07-19 19:28:57 +02:00
Peter Osterlund
408cb78272 Make class fields in EditPGN private 2019-07-19 19:26:43 +02:00
Peter Osterlund
bdd577bb93 Translation update 2019-07-19 08:36:26 +02:00
Peter Osterlund
2145f67e91 Whitespace fix 2019-07-17 08:38:12 +02:00
Peter Osterlund
7da4b21d9b Add missing copyright headers 2019-06-15 20:30:47 +02:00
Peter Osterlund
93b3434af9 Disable language setting code for API >= 28
The existing code does not work for API >= 28 and it is unknown how to
make it work.
2019-06-15 11:27:04 +02:00
Peter Osterlund
eabe60e65f Fix Android Studio warnings in EngineServer module 2019-06-15 02:08:42 +02:00
Peter Osterlund
0ca5a1092d Don't try to use a non-existing directory for external processes 2019-06-11 17:30:04 +02:00
Peter Osterlund
be1b667f35 Set working directory for external engines
When running an external engine set the working directory of the
engine process to .../DroidFish/uci/logs. This makes it possible for
the engine to create log files or other auxiliary files in that
directory.

This is useful for the OpenCL version of LC0, which needs to create a
tuning file somewhere. With this change it can be placed in the
current working directory.
2019-06-10 20:06:15 +02:00
Peter Osterlund
71221314e6 Use vector graphics for "silhouette" icon
This icon is used for notifications.
2019-06-09 13:10:05 +02:00
Peter Osterlund
f3c1a6289d Fix formatting of CPU warning dialog text 2019-06-09 12:28:50 +02:00
Peter Osterlund
010e01589d Make CPU usage notification work for Android 26 2019-06-09 11:12:08 +02:00
Peter Osterlund
b60105780b Update app icon
New icons for android 26 and later. Also add round icons.
2019-06-09 08:57:46 +02:00
Peter Osterlund
f95b643462 Made it possible to run engineServer without a display
If the "-nogui" option is passed to the engineServer program it will
run the servers previously configured, but it will not try to show the
GUI to change the engine configuration settings.
2019-05-26 10:22:48 +02:00
Peter Osterlund
3363b1d9c0 Use try-with-resources 2019-05-25 09:05:57 +02:00
Peter Osterlund
16e7c34337 Move "new game" action to the left drawer menu
Only use the right drawer menu for less common actions.
2019-05-25 06:56:38 +02:00
Peter Osterlund
5573b2be2f Don't truncate game history when sending moves to the chess engine
The LC0 engine evaluation function depends on the move history.

Null moves are still truncated though, since a UCI engine is not
expected to be able to handle null moves.
2019-05-25 06:54:31 +02:00
Peter Osterlund
dfaa220946 Remove unnecessary memory allocations 2019-05-23 21:03:23 +02:00
Peter Osterlund
f534754f10 Ignore whitespace in port input field. 2019-05-23 06:22:09 +02:00
Peter Osterlund
b69af245e6 Fix CPU waste in EngineServer 2019-05-19 00:38:46 +02:00
Peter Osterlund
fe0de534a0 Update information about network engine server software 2019-05-19 00:38:14 +02:00
Peter Osterlund
fa9cf93245 Create EngineServer Java program
This program can be run on a PC and works as an engine server that
DroidFish can connect to using its "network engine" feature.
2019-05-18 21:20:27 +02:00
Hamidreza Bayat
490bacfce0 Remove redundant type casts 2019-04-28 19:51:20 +04:30
Hamidreza Bayat
708660958c Replace anonymous classes with lambda in CuckooChessEngine 2019-04-28 19:51:20 +04:30
Hamidreza Bayat
6a90c4e650 Replace anonymous classes with lambda in CuckooChess 2019-04-28 19:51:20 +04:30
Hamidreza Bayat
7b6841b9fb Use Java 8 on CuckooChess,CuckooChessEngine 2019-04-28 19:51:20 +04:30
Ebrahim Byagowi
3f0b5e0045 Use Nimbus theme on the applet
See https://docs.oracle.com/javase/tutorial/uiswing/lookandfeel/nimbus.html
2019-04-25 00:30:10 +02:00
Peter Osterlund
69206ef89b Include casefont.ttf in cuckoochess jar file 2019-04-25 00:30:10 +02:00
Peter Osterlund
5d599c2782 Code reformatting 2019-04-24 23:43:46 +02:00
Peter Osterlund
068b97ac85 Reformat XML files 2019-04-24 23:43:46 +02:00
Peter Osterlund
39d4c91bbd Adjust titlebar padding 2019-04-23 21:54:39 +02:00
Peter Osterlund
2b5e88d8c0 Simplify TourGuide.java using getToolTip() 2019-04-23 21:39:21 +02:00
Ebrahim Byagowi
31d8ebab0e Use binding in LoadFEN and EditPGN 2019-04-23 20:09:12 +02:00
Ebrahim Byagowi
0324409feb Use binding in SeekBarPreference 2019-04-23 20:09:12 +02:00
Ebrahim Byagowi
7e4a0314c9 Use binding in EditOptions root also 2019-04-23 20:09:12 +02:00
Ebrahim Byagowi
a912458ffb Use binding in EditOptions and TourGuide of DroidFishApp 2019-04-23 20:09:12 +02:00
Ebrahim Byagowi
80e8183757 Use more idiomatic and implicit pointer dereference 2019-04-22 20:04:37 +02:00