当前位置: 首页>>代码示例>>Java>>正文


Java World类代码示例

本文整理汇总了Java中info.gridworld.world.World的典型用法代码示例。如果您正苦于以下问题:Java World类的具体用法?Java World怎么用?Java World使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


World类属于info.gridworld.world包,在下文中一共展示了World类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: locationClicked

import info.gridworld.world.World; //导入依赖的package包/类
/**
 * Callback on mousePressed when editing a grid.
 */
private void locationClicked() {
    World<T> world = parentFrame.getWorld();
    Location loc = display.getCurrentLocation();
    if (loc != null && !world.locationClicked(loc))
        editLocation();
    parentFrame.repaint();
}
 
开发者ID:CBSkarmory,项目名称:AWGW,代码行数:11,代码来源:GUIController.java

示例2: deleteLocation

import info.gridworld.world.World; //导入依赖的package包/类
/**
 * Edits the contents of the current location, by displaying the constructor
 * or method menu.
 */
public void deleteLocation() {
    World<T> world = parentFrame.getWorld();
    Location loc = display.getCurrentLocation();
    if (loc != null) {
        world.remove(loc);
        parentFrame.repaint();
    }
}
 
开发者ID:CBSkarmory,项目名称:AWGW,代码行数:13,代码来源:GUIController.java

示例3: locationClicked

import info.gridworld.world.World; //导入依赖的package包/类
/**
 * Callback on mousePressed when editing a grid.
 */
private void locationClicked()
{
    World<T> world = parentFrame.getWorld();
    Location loc = display.getCurrentLocation();
    if (loc != null && !world.locationClicked(loc))
        editLocation();
    parentFrame.repaint();
}
 
开发者ID:ReagentX,项目名称:heidnerComputerScienceProjects,代码行数:12,代码来源:GUIController.java

示例4: deleteLocation

import info.gridworld.world.World; //导入依赖的package包/类
/**
 * Edits the contents of the current location, by displaying the constructor
 * or method menu.
 */
public void deleteLocation()
{
    World<T> world = parentFrame.getWorld();
    Location loc = display.getCurrentLocation();
    if (loc != null)
    {
        world.remove(loc);
        parentFrame.repaint();
    }
}
 
开发者ID:ReagentX,项目名称:heidnerComputerScienceProjects,代码行数:15,代码来源:GUIController.java

示例5: getWorld

import info.gridworld.world.World; //导入依赖的package包/类
/**
 * Gets the world that this frame displays
 * @return the world
 */
public World<T> getWorld()
{
    return world;
}
 
开发者ID:ReagentX,项目名称:heidnerComputerScienceProjects,代码行数:9,代码来源:WorldFrame.java

示例6: ForLoopCircles

import info.gridworld.world.World; //导入依赖的package包/类
public ForLoopCircles()
{
    circleGrid =    new BoundedGrid<String>(1,10);
    circleWorld = new World<String>(circleGrid);
}
 
开发者ID:ReagentX,项目名称:heidnerComputerScienceProjects,代码行数:6,代码来源:ForLoopCircles.java

示例7: BoxWord

import info.gridworld.world.World; //导入依赖的package包/类
public BoxWord()
{
	charGrid = 	new BoundedGrid<String>(0,0);
	charWorld = new World<String>(charGrid);
}
 
开发者ID:ReagentX,项目名称:heidnerComputerScienceProjects,代码行数:6,代码来源:BoxWord.java

示例8: drawCircles

import info.gridworld.world.World; //导入依赖的package包/类
public void drawCircles()
{
    for (int i=0; i<circleGrid.getNumCols(); i++){
        circleGrid.put(new Location(0,i),"O");
      }

    //add a for loop here
        


    circleWorld = new World<String>(circleGrid);        
}
 
开发者ID:ReagentX,项目名称:heidnerComputerScienceProjects,代码行数:13,代码来源:ForLoopCircles.java

示例9: getWorld

import info.gridworld.world.World; //导入依赖的package包/类
/**
 * Gets the world that this frame displays
 *
 * @return the world
 */
public World<T> getWorld() {
    return world;
}
 
开发者ID:CBSkarmory,项目名称:AWGW,代码行数:9,代码来源:WorldFrame.java


注:本文中的info.gridworld.world.World类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。