rename create_turtle{,_plan}

This commit is contained in:
2025-10-17 18:38:44 +02:00
parent 3509060390
commit fcca1a2db4
6 changed files with 12 additions and 18 deletions
+3 -3
View File
@@ -53,7 +53,7 @@ use syn::{parse_macro_input, ItemFn};
///
/// #[macroquad::main("My Turtle Drawing")]
/// async fn main() {
/// let mut turtle = create_turtle();
/// let mut turtle = create_turtle_plan();
///
/// // Your drawing code here
/// turtle.set_pen_color(RED);
@@ -102,7 +102,7 @@ pub fn turtle_main(args: TokenStream, input: TokenStream) -> TokenStream {
quote! {
#[macroquad::main(#window_title)]
async fn main() {
let mut turtle = turtle_lib::create_turtle();
let mut turtle = turtle_lib::create_turtle_plan();
// Call the user's function with the turtle
#fn_name(&mut turtle);
@@ -139,7 +139,7 @@ pub fn turtle_main(args: TokenStream, input: TokenStream) -> TokenStream {
quote! {
#[macroquad::main(#window_title)]
async fn main() {
let mut turtle = turtle_lib::create_turtle();
let mut turtle = turtle_lib::create_turtle_plan();
// Inline the user's code
#fn_block