JuliaKara.jl Documentation
Functions
World
JuliaKara.@World
— Macro.@World [name] defintion
definition
is either a String
describing the path to a world-file which should be loaded or a Tuple{Int,Int}
describing the height and the width of the world
In case a name
is provided (Must be a name that can be used as a variable name) a variable in global scope named name
and a macro named @name
are created which allow access to the world (See Examples).
In case no name
is provided the world is stored in global scope in a variable named world
and kara is placed at location 1,1 and refereced with a global variable named kara
. Furthermore all function used for interaction with kara (move()
, turnLeft()
, ...) are extended with methods to allow calls like move(kara)
.
Examples
julia> @World (10,10)
julia> move(kara) # moves kara in world
julia> @world testw (10,10)
julia> lara = @testw place_kara()
julia> @testw move(lara) # moves lara in testw
Interaction
JuliaKara.JuliaKara_noGUI.move
— Function.move(wo::World,ac::Actor)
Moves the actor ac
a step forward in the world wo
.
move(wo::World_GUI,ac::Actor)
Moves the actor ac
a step forward in the world wo
.
This function is a wrapper around JuliaKara_noGUI.move
to support GUI.
JuliaKara.JuliaKara_noGUI.turnLeft
— Function.turnLeft(wo::World,ac::Actor)
Turns the actor ac
counter clockwise.
turnLeft(wo::World_GUI,ac::Actor)
Turns the actor ac
counter clockwise.
This function is a wrapper around JuliaKara_noGUI.turnLeft
to support GUI.
JuliaKara.JuliaKara_noGUI.turnRight
— Function.turnRight(wo::World,ac::Actor)
Turns the actor ac
clockwise.
turnRight(wo::World_GUI,ac::Actor)
Turns the actor ac
clockwise.
This function is a wrapper around JuliaKara_noGUI.turnRight
to support GUI.
JuliaKara.JuliaKara_noGUI.putLeaf
— Function.putLeaf(wo::World,ac::Actor)
Places an actor of type leaf the location ac
is at.
putLeaf(wo::World_GUI,ac::Actor)
Places an actor of type leaf the location ac
is at.
This function is a wrapper around JuliaKara_noGUI.putLeaf
to support GUI.
JuliaKara.JuliaKara_noGUI.removeLeaf
— Function.removeLeaf(wo::World,ac::Actor)
Removes an actor of type leaf from the location ac
is at.
removeLeaf(wo::World_GUI,ac::Actor)
Removes an actor of type leaf from the location ac
is at.
This function is a wrapper around JuliaKara_noGUI.removeLeaf
to support GUI.
Sensors
JuliaKara.JuliaKara_noGUI.treeFront
— Function.treeFront(wo::World,ac::Actor)
Checks if there is an actor of type tree in front of actor ac
.
treeFront(wo::World_GUI,ac::Actor)
Checks if there is an actor of type tree in front of actor ac
.
This function is a wrapper around JuliaKara_noGUI.treeFront
to support GUI.
JuliaKara.JuliaKara_noGUI.treeLeft
— Function.treeLeft(wo::World,ac::Actor)
Checks if there is an actor of type tree left of actor ac
.
treeLeft(wo::World_GUI,ac::Actor)
Checks if there is an actor of type tree left of actor ac
.
This function is a wrapper around JuliaKara_noGUI.treeLeft
to support GUI.
JuliaKara.JuliaKara_noGUI.treeRight
— Function.treeRight(wo::World,ac::Actor)
Checks if there is an actor of type tree right of actor ac
.
treeRight(wo::World_GUI,ac::Actor)
Checks if there is an actor of type tree right of actor ac
.
This function is a wrapper around JuliaKara_noGUI.treeRight
to support GUI.
JuliaKara.JuliaKara_noGUI.mushroomFront
— Function.mushroomFront(wo::World,ac::Actor)
Checks if there is an actor of type mushroom in front of actor ac
.
mushroomFront(wo::World_GUI,ac::Actor)
Checks if there is an actor of type mushroom in front of actor ac
.
This function is a wrapper around JuliaKara_noGUI.mushroomFront
to support GUI.
JuliaKara.JuliaKara_noGUI.onLeaf
— Function.onLeaf(wo::World,ac::Actor)
Checks if there is an actor of type leaf below of actor ac
.
onLeaf(wo::World_GUI,ac::Actor)
Checks if there is an actor of type leaf below of actor ac
.
This function is a wrapper around JuliaKara_noGUI.onLeaf
to support GUI.
Index
JuliaKara.JuliaKara_noGUI.ActorsWorld.Actor
JuliaKara.JuliaKara_noGUI.ActorsWorld.Actor_Definition
JuliaKara.JuliaKara_noGUI.ActorsWorld.Location
JuliaKara.JuliaKara_noGUI.ActorsWorld.Orientation
JuliaKara.JuliaKara_noGUI.ActorsWorld.Size
JuliaKara.JuliaKara_noGUI.ActorsWorld.World
JuliaKara.JuliaKara_noGUI.ActorsWorld.actor_create!
JuliaKara.JuliaKara_noGUI.ActorsWorld.actor_definition_at_location
JuliaKara.JuliaKara_noGUI.ActorsWorld.actor_delete!
JuliaKara.JuliaKara_noGUI.ActorsWorld.actor_move!
JuliaKara.JuliaKara_noGUI.ActorsWorld.actor_moveto!
JuliaKara.JuliaKara_noGUI.ActorsWorld.actor_pickup!
JuliaKara.JuliaKara_noGUI.ActorsWorld.actor_putdown!
JuliaKara.JuliaKara_noGUI.ActorsWorld.actor_rotate!
JuliaKara.JuliaKara_noGUI.ActorsWorld.actor_validate_location_move
JuliaKara.JuliaKara_noGUI.ActorsWorld.get_actors_at_location
JuliaKara.JuliaKara_noGUI.ActorsWorld.get_actors_at_location_on_layer
JuliaKara.JuliaKara_noGUI.ActorsWorld.is_actor_definition_front
JuliaKara.JuliaKara_noGUI.ActorsWorld.is_actor_definition_here
JuliaKara.JuliaKara_noGUI.ActorsWorld.is_actor_definition_left
JuliaKara.JuliaKara_noGUI.ActorsWorld.is_actor_definition_right
JuliaKara.JuliaKara_noGUI.ActorsWorld.location_fix_ooBound
JuliaKara.JuliaKara_noGUI.ActorsWorld.location_move
JuliaKara.JuliaKara_noGUI.ActorsWorld.location_within_world
JuliaKara.JuliaKara_noGUI.ActorsWorld.orientation_rotate
JuliaKara.JuliaKara_noGUI.ActorsWorld.reset!
JuliaKara.JuliaKara_noGUI.ActorsWorld.world_state_save
JuliaKara.JuliaKara_noGUI.move
JuliaKara.JuliaKara_noGUI.mushroomFront
JuliaKara.JuliaKara_noGUI.onLeaf
JuliaKara.JuliaKara_noGUI.putLeaf
JuliaKara.JuliaKara_noGUI.removeLeaf
JuliaKara.JuliaKara_noGUI.treeFront
JuliaKara.JuliaKara_noGUI.treeLeft
JuliaKara.JuliaKara_noGUI.treeRight
JuliaKara.JuliaKara_noGUI.turnLeft
JuliaKara.JuliaKara_noGUI.turnRight
JuliaKara.@World