.. _example-code: Example Code ============ The example code here starts out simple and gets more complex. The example code progresses through these topics: * How to call functions * How to create functions * How use function callbacks and static function variables * How to make loops * How to use nested loops * How to create classes * How to allow the user to control items on the screen * How to use sprites * How to use a two-dimensional list Example list ^^^^^^^^^^^^ .. toctree:: :maxdepth: 3 drawing_primitives drawing_with_functions drawing_text bouncing_rectangle bouncing_ball bouncing_balls radar_sweep drawing_with_loops nested_loops shapes starting_template timer move_mouse move_keyboard move_joystick joystick sprite_collect_coins sprite_change_coins sprite_collect_coins_move_down sprite_collect_coins_move_bouncing sprite_collect_coins_move_circle sprite_bullets sprite_bullets_aimed sprite_move_walls sprite_move_scrolling sprite_move_animation sprite_tiled_map sprite_ramps sprite_moving_platforms instruction_and_game_over_screens array_backed_grid asteroid_smasher examples_to_do