mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2024-12-28 09:58:30 +01:00
remove nPlayers from game_summarize
This commit is contained in:
parent
92940e6638
commit
71059e6dff
2 changed files with 7 additions and 7 deletions
|
@ -986,13 +986,13 @@ Java_org_eehouse_android_xw4_jni_XwJNI_game_1receiveMessage
|
|||
|
||||
JNIEXPORT void JNICALL
|
||||
Java_org_eehouse_android_xw4_jni_XwJNI_game_1summarize
|
||||
( JNIEnv* env, jclass C, jint gamePtr, jint nPlayers, jobject jsummary )
|
||||
( JNIEnv* env, jclass C, jint gamePtr, jobject jsummary )
|
||||
{
|
||||
LOG_FUNC();
|
||||
XWJNI_START();
|
||||
XP_S16 nMoves = model_getNMoves( state->game.model );
|
||||
ModelCtxt* model = state->game.model;
|
||||
XP_S16 nMoves = model_getNMoves( model );
|
||||
setInt( env, jsummary, "nMoves", nMoves );
|
||||
setInt( env, jsummary, "nPlayers", nPlayers );
|
||||
XP_Bool gameOver = server_getGameIsOver( state->game.server );
|
||||
setBool( env, jsummary, "gameOver", gameOver );
|
||||
|
||||
|
@ -1017,17 +1017,18 @@ Java_org_eehouse_android_xw4_jni_XwJNI_game_1summarize
|
|||
}
|
||||
}
|
||||
|
||||
XP_U16 nPlayers = model_getNPlayers( model );
|
||||
jint jvals[nPlayers];
|
||||
int ii;
|
||||
if ( gameOver ) {
|
||||
ScoresArray scores;
|
||||
model_figureFinalScores( state->game.model, &scores, NULL );
|
||||
model_figureFinalScores( model, &scores, NULL );
|
||||
for ( ii = 0; ii < nPlayers; ++ii ) {
|
||||
jvals[ii] = scores.arr[ii];
|
||||
}
|
||||
} else {
|
||||
for ( ii = 0; ii < nPlayers; ++ii ) {
|
||||
jvals[ii] = model_getPlayerScore( state->game.model, ii );
|
||||
jvals[ii] = model_getPlayerScore( model, ii );
|
||||
}
|
||||
}
|
||||
jintArray jarr = makeIntArray( env, nPlayers, jvals );
|
||||
|
|
|
@ -95,8 +95,7 @@ public class XwJNI {
|
|||
|
||||
public static native boolean game_receiveMessage( int gamePtr,
|
||||
byte[] stream );
|
||||
public static native void game_summarize( int gamePtr, int nPlayers,
|
||||
GameSummary summary );
|
||||
public static native void game_summarize( int gamePtr, GameSummary summary );
|
||||
public static native byte[] game_saveToStream( int gamePtr,
|
||||
CurGameInfo gi );
|
||||
public static native boolean game_hasComms( int gamePtr );
|
||||
|
|
Loading…
Reference in a new issue