Skip to content

Commit

Permalink
* f-droid metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
jcarolus committed Jan 13, 2023
1 parent 3eeafae commit 0dbe949
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 4 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
- Free
- NO ads
- Published on the Google Play store https://play.google.com/store/apps/details?id=jwtc.android.chess
- Published on F-droid https://f-droid.org/packages/jwtc.android.chess/


## Special features
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ public void stringToClipboard(String s, String sToast) {
clipData = ClipData.newPlainText("text", s);
clipboardManager.setPrimaryClip(clipData);
doToast(sToast);

Log.d(TAG, "to clipboard: " + s);
}

public String getStringFromClipboard() {
Expand Down
3 changes: 2 additions & 1 deletion app/src/main/java/jwtc/android/chess/services/GameApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,7 @@ private boolean moveDuck(int duckMove) {

int index = jni.getNumBoard() - 2;
if (index >= 0 && index < _arrPGN.size()) {
Log.d(TAG, " set duckmove " + index + " " + Pos.toString(duckMove));
_arrPGN.get(index)._duckMove = duckMove;
}
return true;
Expand Down Expand Up @@ -679,7 +680,7 @@ private boolean loadPGNMoves(String s) {


public void addPGNEntry(int ply, String sMove, String sAnnotation, int move, int duckMove) {
// Log.d(TAG, "addPGNEntry " + ply + ": " + sMove);
Log.d(TAG, "addPGNEntry " + ply + ": " + sMove + " @ " + Pos.toString(duckMove) + " = " + duckMove);
while (ply >= 0 && _arrPGN.size() >= ply) {
_arrPGN.remove(_arrPGN.size() - 1);
}
Expand Down
13 changes: 10 additions & 3 deletions app/src/main/java/jwtc/chess/Pos.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ public class Pos {
// when a position cannot be created a message is sent on console out (co).
// used to initialize values, no speed needed
public static int fromString(final String s) throws Exception {
//if(s.length() != 2)
// co.pl("Cannot create Pos from: " + s);
if(s.length() != 2) {
throw new Exception("Invalid position [" + s + "]");
}
char c = s.charAt(0);
if(c < 'a' || c > 'h') {
throw new Exception("Invalid file for position [" + s + "]");
Expand Down Expand Up @@ -48,8 +49,14 @@ public static int col(final int val) {
}

// returns string representation of the value; ie "d5"
// @val positional value [0-63] - no check on valid range
// -1 is duck position, otherwihse return "?"
public static String toString(final int val) {
if (val > 63 || val < -1) {
return "?";
}
if (val == -1) {
return "X";
}
return "" + ((char) (Pos.col(val) + (int) 'a')) + "" + (8 - Pos.row(val));
}

Expand Down
1 change: 1 addition & 0 deletions fastlane/metadata/en-US/full_description.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Play chess online or offline. Solve puzzles. Supports Chess 960 and Duck Chess.
Binary file added fastlane/metadata/en-US/images/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions fastlane/metadata/en-US/short_description.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Chess. Practice, puzzle, play online and many more features. Enjoy chess.
1 change: 1 addition & 0 deletions fastlane/metadata/en-US/title.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Chess

0 comments on commit 0dbe949

Please sign in to comment.