Example #1
0
 private void undo(String[] cmdArray) {
   if (cmdArray.length > 1) {
     System.out.println("undo command takes no arguments");
     return;
   }
   StringBuilder response = new StringBuilder();
   if (!send("undo", response)) {
     System.out.println(response);
     return;
   }
   m_board.undo();
   m_currentNode = m_currentNode.getFather();
   printBoard();
 }
Example #2
0
 private void play(Move move) {
   m_board.play(move);
   Node node = new Node(move);
   m_currentNode.append(node);
   m_currentNode = node;
 }