Android Open Source - acceptableLosses Dig Job






From Project

Back to project page acceptableLosses.

License

The source code is released under:

MIT License

If you think the Android project acceptableLosses listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package acceptableLosses.work.jobs;
// ww  w .ja  va 2 s.c  o m
import acceptableLosses.components.Resume;
import acceptableLosses.map.Region;
import com.stewsters.util.math.Point3i;


public class DigJob implements Job {

    private Region region;
    private Point3i startPos;
    private int assignee;

    public DigJob(Region region, Point3i startPos) {
        this.region = region;
        this.startPos = startPos;
        this.assignee = 0;
    }

    @Override
    public boolean satisfiedBy(Resume resume) {
        return resume.canDig;
    }

    @Override
    public Point3i getStartPos() {
        return startPos;
    }

//    @Override
//    public int work() {

//        Tile tile = location.getTile(startPos);
//        tile.tileType = GameTypes.tileTypes.get("void");
//        tile.atmosphere = 10; //TODO: fill with air?
//        //if there are now people standing in the air, drop them
//
//        return 50;
//    }

    @Override
    public int getWorkDistance() {
        return 1;
    }

    @Override
    public void setAssignee(int id) {
        assignee = id;
    }

    @Override
    public int getAssignee() {
        return assignee;
    }


}




Java Source Code List

acceptableLosses.AcceptableLossesGame.java
acceptableLosses.android.AndroidLauncher.java
acceptableLosses.assets.AssetLoader.java
acceptableLosses.assets.FurnitureType.java
acceptableLosses.assets.TileType.java
acceptableLosses.components.Appearance.java
acceptableLosses.components.Cargo.java
acceptableLosses.components.Citizen.java
acceptableLosses.components.Destination.java
acceptableLosses.components.Health.java
acceptableLosses.components.Path.java
acceptableLosses.components.Position.java
acceptableLosses.components.Resume.java
acceptableLosses.components.Sentience.java
acceptableLosses.components.Task.java
acceptableLosses.controls.GestureDetectorController.java
acceptableLosses.controls.InputManager.java
acceptableLosses.controls.ZoomInputProcessor.java
acceptableLosses.controls.commands.Command.java
acceptableLosses.controls.commands.TapCommand.java
acceptableLosses.desktop.DesktopLauncher.java
acceptableLosses.desktop.ImagePacker.java
acceptableLosses.map.AsteroidGenerator.java
acceptableLosses.map.Chunk.java
acceptableLosses.map.Furniture.java
acceptableLosses.map.MapTools.java
acceptableLosses.map.Region.java
acceptableLosses.map.Spawner.java
acceptableLosses.pathing.FastNonOptimalHeuristic.java
acceptableLosses.screens.GameScreen.java
acceptableLosses.screens.SplashScreen.java
acceptableLosses.systems.AiSystem.java
acceptableLosses.systems.AppearanceRenderSystem.java
acceptableLosses.systems.ElevationSystem.java
acceptableLosses.systems.FurnitureRenderSystem.java
acceptableLosses.systems.JobAssignerSystem.java
acceptableLosses.systems.MapRenderSystem.java
acceptableLosses.systems.MovementSystem.java
acceptableLosses.systems.PathFinderSystem.java
acceptableLosses.work.CivilianMover.java
acceptableLosses.work.jobs.DigJob.java
acceptableLosses.work.jobs.Job.java