useless printing refactor
This commit is contained in:
parent
c6fd13f0a4
commit
c59afecba5
|
@ -62,21 +62,17 @@ pub fn suggest(matrix: String, hold: String, next: String) -> Result<String, Str
|
|||
};
|
||||
|
||||
Ok(format!(
|
||||
"{x},{y},{r},{ty}",
|
||||
x = res.loc.x,
|
||||
y = res.loc.y,
|
||||
r = rot(res.loc.r),
|
||||
ty = res.ty
|
||||
))
|
||||
}
|
||||
|
||||
fn rot(r: Rot) -> &'static str {
|
||||
match r {
|
||||
"{},{},{},{}",
|
||||
res.loc.x,
|
||||
res.loc.y,
|
||||
match res.loc.r {
|
||||
Rot::N => "spawn",
|
||||
Rot::E => "right",
|
||||
Rot::S => "reverse",
|
||||
Rot::W => "left",
|
||||
}
|
||||
},
|
||||
res.ty.name(),
|
||||
))
|
||||
}
|
||||
|
||||
fn parse_matrix(s: &str) -> MatBuf {
|
||||
|
|
Loading…
Reference in New Issue