Fix dependency loop
This commit is contained in:
		
							parent
							
								
									b7278d6afc
								
							
						
					
					
						commit
						f529fc5237
					
				
					 25 changed files with 251 additions and 199 deletions
				
			
		| 
						 | 
				
			
			@ -1,11 +1,8 @@
 | 
			
		|||
module RPGEngine.Data.Default
 | 
			
		||||
-- Everything is exported
 | 
			
		||||
where
 | 
			
		||||
import RPGEngine.Data (Entity (..), Game (..), Item (..), Layout, Player (..), Level (..), StateBase (..), State (..), Physical (..), Direction (..))
 | 
			
		||||
import RPGEngine.Data (Entity (..), Game (..), Item (..), Layout, Player (..), Level (..), State (..), Physical (..), Direction (..))
 | 
			
		||||
import RPGEngine.Input.Core (ListSelector(..))
 | 
			
		||||
import RPGEngine.Render.LevelSelection (renderLevelSelection)
 | 
			
		||||
import RPGEngine.Input.Playing (spawnPlayer)
 | 
			
		||||
import RPGEngine.Render.Menu (renderMenu)
 | 
			
		||||
 | 
			
		||||
------------------------------ Defaults ------------------------------
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -36,9 +33,9 @@ defaultItem = Item {
 | 
			
		|||
 | 
			
		||||
defaultLayout :: Layout
 | 
			
		||||
defaultLayout = [
 | 
			
		||||
    [Blocked, Blocked, Blocked],
 | 
			
		||||
    [Blocked, Entrance, Blocked],
 | 
			
		||||
    [Blocked, Blocked, Blocked]
 | 
			
		||||
    [Blocked, Blocked, Blocked, Blocked, Blocked],
 | 
			
		||||
    [Blocked, Entrance, Walkable, Exit, Blocked],
 | 
			
		||||
    [Blocked, Blocked, Blocked, Blocked, Blocked]
 | 
			
		||||
    ]
 | 
			
		||||
 | 
			
		||||
defaultLevel :: Level
 | 
			
		||||
| 
						 | 
				
			
			@ -52,8 +49,14 @@ defaultLevel = Level {
 | 
			
		|||
        (1, 1, Entrance),
 | 
			
		||||
        (1, 2, Blocked),
 | 
			
		||||
        (2, 0, Blocked),
 | 
			
		||||
        (2, 1, Blocked),
 | 
			
		||||
        (2, 2, Blocked)
 | 
			
		||||
        (2, 1, Walkable),
 | 
			
		||||
        (2, 2, Blocked),
 | 
			
		||||
        (3, 0, Blocked),
 | 
			
		||||
        (3, 1, Exit),
 | 
			
		||||
        (3, 2, Blocked),
 | 
			
		||||
        (4, 0, Blocked),
 | 
			
		||||
        (4, 1, Blocked),
 | 
			
		||||
        (4, 2, Blocked)
 | 
			
		||||
    ],
 | 
			
		||||
    items    = [],
 | 
			
		||||
    entities = []
 | 
			
		||||
| 
						 | 
				
			
			@ -64,4 +67,10 @@ defaultPlayer = Player {
 | 
			
		|||
    playerHp  = Prelude.Nothing, -- Compares to infinity
 | 
			
		||||
    inventory = [],
 | 
			
		||||
    position  = (0, 0)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
defaultSelector :: ListSelector
 | 
			
		||||
defaultSelector = ListSelector {
 | 
			
		||||
    selection = 0,
 | 
			
		||||
    selected = False
 | 
			
		||||
}
 | 
			
		||||
		Reference in a new issue