diff --git a/tidepool-utils/fumen-replay.js b/tidepool-utils/fumen-replay.js index 1b0e061..6bdd9c1 100644 --- a/tidepool-utils/fumen-replay.js +++ b/tidepool-utils/fumen-replay.js @@ -20,11 +20,11 @@ export async function main(args) { let mino = { type: move.type, rotation: { - 'north': 'spawn', - 'east': 'right', - 'south': 'reverse', - 'west': 'left', - }[move.orientation], + N: 'spawn', + E: 'right', + S: 'reverse', + W: 'left', + }[move.r], x: move.x, y: move.y, }; diff --git a/tidepool/src/output.rs b/tidepool/src/output.rs index 76e9de2..fd63da9 100644 --- a/tidepool/src/output.rs +++ b/tidepool/src/output.rs @@ -55,27 +55,18 @@ mod ser { ty: char, x: i16, y: i16, - orientation: Orientation, - } - - #[derive(Serialize)] - #[serde(rename_all = "lowercase")] - enum Orientation { - North, - East, - South, - West, + r: char, } Placement { ty: pc.ty.as_char(), x: pc.loc.x, y: pc.loc.y, - orientation: match pc.loc.r { - mino::Rot::N => Orientation::North, - mino::Rot::E => Orientation::East, - mino::Rot::S => Orientation::South, - mino::Rot::W => Orientation::West, + r: match pc.loc.r { + mino::Rot::N => 'N', + mino::Rot::E => 'E', + mino::Rot::S => 'S', + mino::Rot::W => 'W', }, } .serialize(serializer)