public boolean processString(String str){
  if (handleCommand(str)) {
    return true;
  }
  if (getGameState() != GameState.ALIVE) {
    return false;
  }
  Move m=TextIO.stringToMove(pos,str);
  if (m == null) {
    return false;
  }
  UndoInfo ui=new UndoInfo();
  pos.makeMove(m,ui);
  TextIO.fixupEPSquare(pos);
  while (currentMove < moveList.size()) {
    moveList.remove(currentMove);
    uiInfoList.remove(currentMove);
    drawOfferList.remove(currentMove);
  }
  moveList.add(m);
  uiInfoList.add(ui);
  drawOfferList.add(pendingDrawOffer);
  pendingDrawOffer=false;
  currentMove++;
  return true;
}

public boolean processString ( String str ) { if ( handleCommand ( str ) ) { return true ; } if ( getGameState ( ) != GameState . ALIVE ) { return false ; } Move m = TextIO . stringToMove ( pos , str ) ; if ( m == null ) { return false ; } UndoInfo ui = new UndoInfo ( ) ; pos . makeMove ( m , ui ) ; TextIO . fixupEPSquare ( pos ) ; while ( currentMove < moveList . size ( ) ) { moveList . remove ( currentMove ) ; uiInfoList . remove ( currentMove ) ; drawOfferList . remove ( currentMove ) ; } moveList . add ( m ) ; uiInfoList . add ( ui ) ; drawOfferList . add ( pendingDrawOffer ) ; pendingDrawOffer = false ; currentMove ++ ; return true ; }
update the game state according to move / command string from a player .
