Package

cwinter.codecraft.core

api

Permalink

package api

Visibility
  1. Public
  2. All

Type Members

  1. abstract class CodeCraftException extends Exception

    Permalink

    Base class for all exceptions specific to CodeCraft.

  2. trait Drone extends AnyRef

    Permalink
    Annotations
    @JSExportAll()
  3. class DroneController extends DroneControllerBase

    Permalink

    A drone controller is an object that governs the behaviour of a drone.

    A drone controller is an object that governs the behaviour of a drone. It exposes a wide range of methods to query the underlying drone's state and give it commands. You can inherit from this class to and override the onEvent methods to implement a drone controller with custom behaviour.

    In Java, use JDroneController instead.

  4. trait DroneControllerBase extends Drone

    Permalink

    A drone controller is an object that governs the behaviour of a drone.

    A drone controller is an object that governs the behaviour of a drone. It exposes a wide range of methods to query the underlying drone's state and give it commands. You can inherit from this class and override the onEvent methods to implement a drone controller with custom behaviour.

    NOTE: You should not actually use this class, but one of it's specialisations. In Scala, use DroneController and in Java use JDroneController.

    Annotations
    @JSExportAll()
  5. case class DroneSpec(storageModules: Int = 0, missileBatteries: Int = 0, constructors: Int = 0, engines: Int = 0, shieldGenerators: Int = 0) extends Product with Serializable

    Permalink

    Specifies the modules equipped by a drone and computes various properties of a Drone with this configuration of modules.

    Specifies the modules equipped by a drone and computes various properties of a Drone with this configuration of modules.

    Currently, the total number of modules is currently limited to 10 but this restriction will likely be lifted in the future.

    storageModules

    Number of storage modules. Allows for storage of mineral crystals and energy globes.

    missileBatteries

    Number of missile batteries. Allows for firing homing missiles.

    constructors

    Number of constructors. Allows for constructing new drones and moving minerals from/to other drones.

    engines

    Number of engines. Increases move speed.

    shieldGenerators

    Number of shield generators. Gives the drone an additional 7 hitpoints each. Shields regenerate over time.

    Annotations
    @JSExportAll()
  6. class JDroneController extends DroneControllerBase

    Permalink

    A drone controller is an object that governs the behaviour of a drone.

    A drone controller is an object that governs the behaviour of a drone. It exposes a wide range of methods to query the underlying drone's state and give it commands. You can inherit from this class and override the onEvent methods to implement a drone controller with custom behaviour.

    In Scala, use DroneController instead.

  7. trait MetaController extends AnyRef

    Permalink

    In addition to your DroneControllers you can have one MetaController, which has a method that will be called once every tick before the onEvent methods on your drone controllers are called.

    In addition to your DroneControllers you can have one MetaController, which has a method that will be called once every tick before the onEvent methods on your drone controllers are called. This can be useful if you want to perform some global computation once every timestep. You can instantiate your MetaController using the DroneControllerBase.metaController method.

  8. class MineralCrystal extends AnyRef

    Permalink

    A mineral crystal.

    A mineral crystal. Can be harvested by drones with storage modules to obtain resources.

    Annotations
    @JSExportAll()
  9. class ObjectNotVisibleException extends CodeCraftException

    Permalink
  10. trait Player extends AnyRef

    Permalink

    Base trait for all objects representing a player.

Value Members

  1. object BluePlayer extends Player

    Permalink

    The blue player.

  2. object GameConstants

    Permalink
  3. object OrangePlayer extends Player

    Permalink

    The orange player.

  4. object RedPlayer extends Player

    Permalink

    The red player.

  5. object TheGameMaster extends GameMasterLike

    Permalink

    Main entry point to start the game.

Ungrouped