Permalink
Browse files

simplify debug commands now that time is advanced manually

  • Loading branch information...
1 parent 0c8d8a9 commit e4e6055a3cb9acfcfb72a7a26bb8ae7cb541506d @Mikolaj Mikolaj committed Apr 8, 2011
Showing with 6 additions and 5 deletions.
  1. +2 −0 src/Command.hs
  2. +4 −5 src/Turn.hs
View
@@ -5,6 +5,7 @@ import Actions
import ItemAction
import Geometry
import Level
+import Version
data Described a = Described { chelp :: String, caction :: a }
| Undescribed { caction :: a }
@@ -34,6 +35,7 @@ acceptCommand h = Described "accept choice" (acceptCurrent h)
historyCommand = Described "display previous messages" displayHistory
dumpCommand = Described "dump current configuration" dumpConfig
heroCommand = Described "cycle among heroes on level" cycleHero
+versionCommand = Described "display game version" (abortWith version)
moveDirCommand = Described "move in direction" move
runDirCommand = Described "run in direction" run
View
@@ -24,7 +24,6 @@ import Random
import State
import Strategy
import StrategyState
-import Version
-- One turn proceeds through the following functions:
--
@@ -258,13 +257,13 @@ stdKeybindings = Keybindings
(K.Char 'Q', quitCommand),
-- debug modes
- (K.Char 'R', Undescribed $ modify toggleVision >> withPerception playerCommand),
- (K.Char 'O', Undescribed $ modify toggleOmniscient >> playerCommand),
- (K.Char 'T', Undescribed $ modify toggleTerrain >> playerCommand),
+ (K.Char 'R', Undescribed $ modify toggleVision),
+ (K.Char 'O', Undescribed $ modify toggleOmniscient),
+ (K.Char 'T', Undescribed $ modify toggleTerrain),
(K.Char 'I', Undescribed $ gets (lmeta . slevel) >>= abortWith),
-- information for the player
- (K.Char 'V', Undescribed $ abortWith version),
+ (K.Char 'V', versionCommand),
(K.Char 'M', historyCommand),
(K.Char 'D', dumpCommand),
(K.Char '?', helpCommand),

0 comments on commit e4e6055

Please sign in to comment.