import { Block } from './block.class' ; import { Ground } from './ground.class' ; import { Wall } from './wall.class' ; export const blockRepresentations = { '#' : ( ) => new Wall ( ) , '.' : ( ) => new Ground ( ) } ; export const blockFactory = ( cave ) : Block => blockRepresentations [ cave ] ( ) ;