From 3dba8ba13b1f4c96aa8d99c8d4db463f12624cf3 Mon Sep 17 00:00:00 2001 From: Andy2 Date: Tue, 24 Aug 2010 18:38:12 -0700 Subject: [PATCH 1/4] Fix bug reported by user: if robot finishes a search but fails to find a move it's still done with its turn and must trade or pass. --- xwords4/common/engine.c | 6 ++++-- xwords4/common/server.c | 14 +++++++------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/xwords4/common/engine.c b/xwords4/common/engine.c index 801ce393d..b9c6cf0ed 100644 --- a/xwords4/common/engine.c +++ b/xwords4/common/engine.c @@ -513,11 +513,13 @@ engine_findMove( EngineCtxt* engine, const ModelCtxt* model, result = XP_FALSE; } else { PossibleMove* move; - result = chooseMove( engine, &move ); - if ( result ) { + if ( chooseMove( engine, &move ) ) { XP_ASSERT( !!newMove ); XP_MEMCPY( newMove, &move->moveInfo, sizeof(*newMove) ); + } else { + newMove->nTiles = 0; } + result = XP_TRUE; } util_engineStopping( engine->util ); diff --git a/xwords4/common/server.c b/xwords4/common/server.c index 70517fa3c..1f89f1ba3 100644 --- a/xwords4/common/server.c +++ b/xwords4/common/server.c @@ -642,7 +642,7 @@ static XP_Bool makeRobotMove( ServerCtxt* server ) { XP_Bool result = XP_FALSE; - XP_Bool finished; + XP_Bool searchComplete; XP_S16 turn; const TrayTileSet* tileSet; MoveInfo newMove; @@ -674,14 +674,14 @@ makeRobotMove( ServerCtxt* server ) } XP_ASSERT( !!server_getEngineFor( server, turn ) ); - finished = engine_findMove( server_getEngineFor( server, turn ), - model, model_getDictionary( model ), - tileSet->tiles, tileSet->nTiles, XP_FALSE, + searchComplete = engine_findMove( server_getEngineFor( server, turn ), + model, model_getDictionary( model ), + tileSet->tiles, tileSet->nTiles, XP_FALSE, #ifdef XWFEATURE_SEARCHLIMIT - NULL, XP_FALSE, + NULL, XP_FALSE, #endif - targetScore, &canMove, &newMove ); - if ( finished ) { + targetScore, &canMove, &newMove ); + if ( searchComplete ) { const XP_UCHAR* str; XWStreamCtxt* stream = NULL; From d1f605798750819c308364a2ad0e4829ac353c32 Mon Sep 17 00:00:00 2001 From: Andy2 Date: Thu, 26 Aug 2010 18:20:24 -0700 Subject: [PATCH 2/4] fix stupid typo that meant crosshairs started on top row was only three cols wide at first. --- xwords4/common/dragdrpp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xwords4/common/dragdrpp.c b/xwords4/common/dragdrpp.c index 7bdad2e73..92860bfc3 100644 --- a/xwords4/common/dragdrpp.c +++ b/xwords4/common/dragdrpp.c @@ -677,7 +677,7 @@ static void crosshairs_init( BoardCtxt* board ) { DragState* ds = &board->dragState; - ds->crosshairs.col = ds->crosshairs.col = -1; + ds->crosshairs.col = ds->crosshairs.row = -1; } static XP_Bool From 0f3867b9956eb0172af12259078d46d954bc95eb Mon Sep 17 00:00:00 2001 From: Andy2 Date: Thu, 26 Aug 2010 18:22:18 -0700 Subject: [PATCH 3/4] up constants/version for beta 15 --- xwords4/android/XWords4/AndroidManifest.xml | 4 ++-- .../XWords4/src/org/eehouse/android/xw4/XWConstants.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/xwords4/android/XWords4/AndroidManifest.xml b/xwords4/android/XWords4/AndroidManifest.xml index 2036b7375..14b7d629f 100644 --- a/xwords4/android/XWords4/AndroidManifest.xml +++ b/xwords4/android/XWords4/AndroidManifest.xml @@ -21,8 +21,8 @@ to come from a domain that you own or have control over. --> diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/XWConstants.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/XWConstants.java index f49d53fc9..b0a9933a8 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/XWConstants.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/XWConstants.java @@ -23,5 +23,5 @@ package org.eehouse.android.xw4; public interface XWConstants { public static final String GAME_EXTN = ".xwg"; public static final String DICT_EXTN = ".xwd"; - public static final String VERSION_STR = "4.4 beta 14"; + public static final String VERSION_STR = "4.4 beta 15"; } From 5ddbef7829ed0ea5f743339fe1687a9fc811c71c Mon Sep 17 00:00:00 2001 From: Andy2 Date: Thu, 26 Aug 2010 18:33:22 -0700 Subject: [PATCH 4/4] update for b15 --- xwords4/android/XWords4/res/raw/changes | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/xwords4/android/XWords4/res/raw/changes b/xwords4/android/XWords4/res/raw/changes index 9791b965a..d14206426 100644 --- a/xwords4/android/XWords4/res/raw/changes +++ b/xwords4/android/XWords4/res/raw/changes @@ -6,19 +6,16 @@ -Crosswords 4.4 beta 14 release +Crosswords 4.4 beta 15 release -
    New features: -
  • This spiffy per-release dialog
  • -
+

This is a quick bug-fix release while I continue work on the new relay connection code.

    Bugs fixed: -
  • Crash exiting board view
  • -
  • Hang searching for robot move
  • -
  • Crash putting up progress dialog after board hidden
  • +
  • Robot wouldn't give up turn when unable to find a move. (Thanks S.A.)
  • +
  • "Crosshairs" was drawn only three columns wide when started on top row
-
    Coming soon: +
      (Still) coming soon
    • builtin hints and help
    • rewrite of gameplay via relay to make connecting easier and allow closed game to receive moves.