gamelib.py
def draw_polygon(self, points: List[int], **options) -> None:
        """
        Draw a polygon with vertices in the given `points` coordinates list. The list must have
        an even amount of numbers; each pair determines a vertex. The last vertex is automatically
        joined with the first one with a segment.

        To see all supported options, see the documentation for
        [`tkinter.Canvas.create_polygon`](https://anzeljg.github.io/rin2/book2/2405/docs/tkinter/create_polygon.html).

        Example:
            ```
            gamelib.draw_polygon([10, 10, 30, 20, 0, 40], outline='white', fill='red')
            ```
        """

        self.send_command_to_tk('draw', 'polygon', points, options)

        Draw a polygon with vertices in the given `points` coordinates list. The list must have
        an even amount of numbers; each pair determines a vertex. The last vertex is automatically
        joined with the first one with a segment.

        To see all supported options, see the documentation for
        [`tkinter.Canvas.create_polygon`](https://anzeljg.github.io/rin2/book2/2405/docs/tkinter/create_polygon.html).

        Example:
            ```
            gamelib.draw_polygon([10, 10, 30, 20, 0, 40], outline='white', fill='red')
            ```
        
Draw a polygon with vertices in the given `points` coordinates list. The list must have
an even amount of numbers; each pair determines a vertex. The last vertex is automatically
joined with the first one with a segment.

To see all supported options, see the documentation for
[`tkinter.Canvas.create_polygon`].
Draw a polygon with vertices in the given ` points ` coordinates list . The list must have an even amount of numbers ; each pair determines a vertex . The last vertex is automatically joined with the first one with a segment . To see all supported options see the documentation for [ ` tkinter . Canvas . create_polygon ` ] .
def draw_polygon(self, points: List[int], **options) -> None:
        self.send_command_to_tk('draw', 'polygon', points, options)
def draw_polygon ( self , points : List [ int ] , ** options ) -> None : self . send_command_to_tk ( 'draw' , 'polygon' , points , options )
Draw a polygon with vertices in the given `points` coordinates list.
Draw a polygon with vertices in the given ` points ` coordinates list .
"""
        Draw a polygon with vertices in the given `points` coordinates list. The list must have
        an even amount of numbers; each pair determines a vertex. The last vertex is automatically
        joined with the first one with a segment.

        To see all supported options, see the documentation for
        [`tkinter.Canvas.create_polygon`](https://anzeljg.github.io/rin2/book2/2405/docs/tkinter/create_polygon.html).

        Example:
            ```
            gamelib.draw_polygon([10, 10, 30, 20, 0, 40], outline='white', fill='red')
            ```
        """
self
points
List[int]
examples
None