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

📄 mainloop.java

📁 一个TSP问题的图形演示程序
💻 JAVA
字号:
/* *  This code is from the book: * *    Winder, R and Roberts, G (2000) Developing Java *    Software, second edition, John Wiley & Sons. * *  It is copyright (c) 2000 Russel Winder and Graham Roberts. */package SimFrameWork ;/** *  This class implements the main control loop of a simulation *  which is run in a separate thread.  This allows the simulation *  to run independently of whatever else the rest of the program *  is doing. * *  @version 2.0 March 1999 *  @author Graham Roberts */public class MainLoop extends Control {  /**   *  Need a world object to run.   *   *  @param g grid to be run.   */  public MainLoop(Grid g) {    world = g ;  }  /**   *  Move simulation through next time step.   */  public void update() {    world.step() ;  }  /**   *  Reference to world being run.   */  private Grid world ;}

⌨️ 快捷键说明

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