/** (C) Game Page Network, Inc., Confidential, All Rights Reserved */
// DisplayCommand.java
// --paul@gamepage.net, 02aug97

import java.io.*;
import java.util.*;

public class DisplayCommand extends Command {
  DisplayCommand() {
    super("display", 1, "TABLE",
	  "Display the current game board at TABLE.");
  }
  public void process(StringTokenizer args, Client c) {
    String name = args.nextToken();
    Table table = Table.findIt(name);
    if (table == null) {
      c.send("! display "+name+": No such table.");
      return;
    }
    Game game = table.getGame();
    if (game == null) {
      c.send("! display "+name+": No such game.");
      return;
    }
    
    game.display(c);
  }
}

