Add more detail to geometry_tasks
This commit is contained in:
parent
ee2c869a03
commit
f9a4c1d81a
@ -5,15 +5,24 @@ use crate::{
|
||||
|
||||
#[allow(dead_code)]
|
||||
pub fn geometry_task() -> Vec<TurtleCommand> {
|
||||
vec![
|
||||
let mut before = vec![
|
||||
TurtleCommand::Forward(Length(100.)),
|
||||
TurtleCommand::Right(Angle::degrees(90.)),
|
||||
TurtleCommand::Backward(Length(100.)),
|
||||
TurtleCommand::Right(Angle::degrees(90.)),
|
||||
TurtleCommand::Forward(Length(100.)),
|
||||
TurtleCommand::Right(Angle::degrees(45.)),
|
||||
//TurtleCommand::PenUp,
|
||||
TurtleCommand::Forward(Length(100.)),
|
||||
];
|
||||
for _ in 0..10 {
|
||||
let mut dash = vec![
|
||||
TurtleCommand::PenUp,
|
||||
TurtleCommand::Forward(Length(5.)),
|
||||
TurtleCommand::PenDown,
|
||||
TurtleCommand::Forward(Length(5.)),
|
||||
];
|
||||
before.append(&mut dash);
|
||||
}
|
||||
let mut after = vec![
|
||||
TurtleCommand::Right(Angle::degrees(90.)),
|
||||
TurtleCommand::Forward(Length(50.)),
|
||||
TurtleCommand::Right(Angle::degrees(90.)),
|
||||
@ -28,5 +37,7 @@ pub fn geometry_task() -> Vec<TurtleCommand> {
|
||||
TurtleCommand::Forward(Length(100.)),
|
||||
TurtleCommand::Right(Angle::degrees(150.)),
|
||||
TurtleCommand::Forward(Length(100.)),
|
||||
]
|
||||
];
|
||||
before.append(&mut after);
|
||||
before
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user