Add Read instances
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
module Dodge.Tweak.Show where
|
||||
import Dodge.Data.Item
|
||||
showTweak :: TweakParam -> String
|
||||
showTweak tp = case tt of
|
||||
TweakPhaseV -> showPhaseV ct
|
||||
TweakTractionPower -> showTractionPower ct
|
||||
TweakSpinDrag -> show ct
|
||||
TweakSpinAmount -> show ct
|
||||
TweakThrustDelay -> show ct
|
||||
where
|
||||
tt = _tweakType tp
|
||||
ct = _tweakVal tp
|
||||
|
||||
showPhaseV :: Int -> String
|
||||
showPhaseV 0 = "V"
|
||||
showPhaseV 1 = "/"
|
||||
showPhaseV 2 = "Z"
|
||||
showPhaseV i = show i ++ " should not be possible"
|
||||
|
||||
showTractionPower :: Int -> String
|
||||
showTractionPower 0 = "+"
|
||||
showTractionPower 1 = "-"
|
||||
showTractionPower 2 = "#"
|
||||
showTractionPower 3 = "0" -- object should stay in the center of the beam
|
||||
showTractionPower i = "THIS SHOULD NOT BE POSSIBLE" ++ show i
|
||||
Reference in New Issue
Block a user