JuliaKara.jl Documentation
Functions
World
JuliaKara.@World — Macro.@World [name] defintiondefinition 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 testwInteraction
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.ActorJuliaKara.JuliaKara_noGUI.ActorsWorld.Actor_DefinitionJuliaKara.JuliaKara_noGUI.ActorsWorld.LocationJuliaKara.JuliaKara_noGUI.ActorsWorld.OrientationJuliaKara.JuliaKara_noGUI.ActorsWorld.SizeJuliaKara.JuliaKara_noGUI.ActorsWorld.WorldJuliaKara.JuliaKara_noGUI.ActorsWorld.actor_create!JuliaKara.JuliaKara_noGUI.ActorsWorld.actor_definition_at_locationJuliaKara.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_moveJuliaKara.JuliaKara_noGUI.ActorsWorld.get_actors_at_locationJuliaKara.JuliaKara_noGUI.ActorsWorld.get_actors_at_location_on_layerJuliaKara.JuliaKara_noGUI.ActorsWorld.is_actor_definition_frontJuliaKara.JuliaKara_noGUI.ActorsWorld.is_actor_definition_hereJuliaKara.JuliaKara_noGUI.ActorsWorld.is_actor_definition_leftJuliaKara.JuliaKara_noGUI.ActorsWorld.is_actor_definition_rightJuliaKara.JuliaKara_noGUI.ActorsWorld.location_fix_ooBoundJuliaKara.JuliaKara_noGUI.ActorsWorld.location_moveJuliaKara.JuliaKara_noGUI.ActorsWorld.location_within_worldJuliaKara.JuliaKara_noGUI.ActorsWorld.orientation_rotateJuliaKara.JuliaKara_noGUI.ActorsWorld.reset!JuliaKara.JuliaKara_noGUI.ActorsWorld.world_state_saveJuliaKara.JuliaKara_noGUI.moveJuliaKara.JuliaKara_noGUI.mushroomFrontJuliaKara.JuliaKara_noGUI.onLeafJuliaKara.JuliaKara_noGUI.putLeafJuliaKara.JuliaKara_noGUI.removeLeafJuliaKara.JuliaKara_noGUI.treeFrontJuliaKara.JuliaKara_noGUI.treeLeftJuliaKara.JuliaKara_noGUI.treeRightJuliaKara.JuliaKara_noGUI.turnLeftJuliaKara.JuliaKara_noGUI.turnRightJuliaKara.@World