Skip to content
Snippets Groups Projects
Commit bd6826b4 authored by David Bergström's avatar David Bergström
Browse files

Add more explicit documentation about maptools

parent fc6083f2
No related branches found
No related tags found
No related merge requests found
......@@ -109,6 +109,43 @@ MapTools
:members:
:undoc-members:
This class contains two types of methods:
* Methods for drawing information to the screen
* Methods for extracting information about the map
First, let us look at the method concerning drawing information to the
screen. Methods with the suffix ``_screen`` takes percentages of the
screens height and width, i.e. values between 0 and 1. Methods without
this suffix uses the same coordinate system as the game, i.e. world
coordinates.
.. automethod:: draw_box
.. automethod:: draw_circle
.. automethod:: draw_line
.. automethod:: draw_text
.. automethod:: draw_text_screen
These are methods which are useful for extracting information about the
game map:
.. automethod:: can_build_type_at_position
.. automethod:: get_closest_tiles_to
.. automethod:: get_distance_map
.. automethod:: get_ground_distance
.. automethod:: get_least_recently_seen_tile
.. autoattribute:: height
.. autoattribute:: width
.. automethod:: is_buildable
.. automethod:: is_connected
.. automethod:: is_depot_buildable_tile
.. automethod:: is_explored
.. automethod:: is_powered
.. automethod:: is_valid_position
.. automethod:: is_valid_tile
.. automethod:: is_visible
.. automethod:: is_walkable
Color
~~~~~
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment