예제 #1
0
JNIEXPORT jstring JNICALL Java_lrstudios_games_gnugo_GnugoEngine_playGtp (JNIEnv* env, jclass clasz, jstring input)
{
	char *cinput = (char*)(*env)->GetStringUTFChars (env, input, NULL);
	strcpy (gtp_input_line, cinput);
	gtp_output_line[0] = '\0';
	play_gtp ();
	(*env)->ReleaseStringUTFChars (env, input, cinput);
	return (*env)->NewStringUTF (env, gtp_output_line);
}
예제 #2
0
jstring
Java_org_ligi_gobandroidhd_ai_gnugo_GnuGoConnection_playGTP (
    JNIEnv*	env,
    jclass clasz,
    jstring input
)
{
    char *cinput = (char*)(*env)->GetStringUTFChars (env, input, NULL);
    strcpy (gtp_input_line, cinput);
    gtp_output_line[0] = '\0';
    play_gtp ();
    (*env)->ReleaseStringUTFChars (env, input, cinput);
    return (*env)->NewStringUTF (env, gtp_output_line);
}