src/gui/maptool/MapTool.java
private void mouseClickedHandler(MouseEvent event) {
        int newType = Integer.parseInt(type.getText());
        if (newType < CellType.types.length) {
            MapToolCell source = (MapToolCell) event.getSource();
            source.setValue(type.getText());
            world.grid[source.x][source.y].type = CellType.types[newType];
            Lighting.computeLamp(world, source.x, source.y);
            updateLighting(source.x, source.y);
        }
    }
/**
     * Assigns the currently selected cell type to the clicked cell,
     * if valid.
     */
Assigns the currently selected cell type to the clicked cell,
if valid.
Assigns the currently selected cell type to the clicked cell if valid .
private void mouseClickedHandler(MouseEvent event) {
        int newType = Integer.parseInt(type.getText());
        if (newType < CellType.types.length) {
            MapToolCell source = (MapToolCell) event.getSource();
            source.setValue(type.getText());
            world.grid[source.x][source.y].type = CellType.types[newType];
            Lighting.computeLamp(world, source.x, source.y);
            updateLighting(source.x, source.y);
        }
    }
private void mouseClickedHandler ( MouseEvent event ) { int newType = Integer . parseInt ( type . getText ( ) ) ; if ( newType < CellType . types . length ) { MapToolCell source = ( MapToolCell ) event . getSource ( ) ; source . setValue ( type . getText ( ) ) ; world . grid [ source . x ] [ source . y ] . type = CellType . types [ newType ] ; Lighting . computeLamp ( world , source . x , source . y ) ; updateLighting ( source . x , source . y ) ; } }
Assigns the currently selected cell type to the clicked cell,
 if valid.
Assigns the currently selected cell type to the clicked cell if valid .