⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 goclient.java

📁 ErGo是一个很早的Java通用围棋服务器(IGS/NNGS)客户端程序。有全部源码和文档
💻 JAVA
字号:
package ergo.ui;

// $Id: GoClient.java,v 1.4 1999/08/27 03:07:55 sigue Exp $

/*
 *  Copyright (C) 1999  Carl L. Gay and Antranig M. Basman.
 *  See the file copyright.txt, distributed with this software,
 *  for further information.
 */

import ergo.logic.Move;
import java.awt.Color;

// An abstract representation of the go client that can be used by
// the objects in ergo.server package rather than depending
// on the TerminalWindow or GameWindow classes.

// +++ This doesn't account for the possibility of one person
//     playing multiple games.  IGS now has (limited?) support
//     for that.

// +++ Should remove the dependency on GameWindow here, if possible.

public interface GoClient extends OutputFocus {
  void displayWarning (String message);
  void displayCommand (String message);
  void displayNoiseString (String message);
  void displayShout (String message);
  void noteConnected ();
  void noteDisconnected ();
  void updateTitle ();
  void beep ();
  YNCDialog openYNCDialog (String title, boolean modal, String question,
				  String yes, String no, String cancel,
				  java.awt.event.ActionListener listener);

  boolean getRawMode ();  // Display all output from server?
  void displayString (String s, Color c, boolean always);
  void displayStringInActiveGame (String s);  // +++ better name?
  void displayLoginDialog ();
  boolean passwordSent ();       // +++ temporary
  void sendPassword ();
  boolean loginDialogExists ();  // +++ temporary
  boolean loginDialogDone ();    // +++ temporary
  // Add a kibitz.  The idea is that there's enough information here
  // to allow the client to lookup the correct game and add the kibitz
  // to the right one even if the user didn't specify the game number.
  void displayKibitz (String whiteName, String blackName, int gameNumber,
			     String kibitzer, String rank, String kibitz);
  void displaySay (String message);
  void displayMatchRequest (String user, String color, String size,
				   String time, String byotime);
  void unobserveGame (int gameNumber);
  void makeGameFree (int gameNumber);  // -1 means active game
  void setAccountName (String newName);
  String getAccountName ();
  void setAccountRank (String rank);
  void displayTell (String message); // +++ should pass user separately
  void displayYell (String author, String message);
  void updateGameStatus (int gameNumber,
				int wcapt, int wtime, int wstones,
				int bcapt, int btime, int bstones);
  void removeGroupAt (String pos);  // Remove a group during server scoring.
  void setKomi (double komi, int gameNumber);  // gameNumber can be -1
  void undoMove ();     // undo in active game
  void undoMove (String whiteName, String blackName, int gameNumber);
  void adjournGame (String whiteName, String blackName, int gameNumber);
  void resignGame (String whiteName, String blackName, int gameNumber,
			  String sgfResult);
  boolean isDisplayingGame (String whiteName, String blackName, int gameNumber);
  // ++++ It would be nice if this didn't return a GameWindow.
  GameWindow createGame (int size, String white, String wrank,
				String black, String brank, double komi);
  void placeMove (String white, String black, int gameNumber,
			 Move m, boolean fromServer);
  // ++++ Get rid of these.
  GameWindow getGameWindowByNumber (int gameNumber);
  GameWindow getGameWindowByName (String whiteName, String blackName, int gameNumber);
  GameWindow getGameBeingPlayed ();
  GameWindow addGameWindow (int size, String w, String wr, String b, String br, double komi, int n, int matchi, int byotime, boolean freeGame);

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -