# Stone trading undercroft, upper entrance, dark gables and a connected study tower.
from hearthwright import Attachment, Choice, Design, Entrance, Join, Level, Materials, Roof, Volume
from hearthwright.cli import run

DESIGN = Design(
    'Rowan merchants house',
    volumes=(
        Volume('hall',
               width=Choice(17, 19),
               depth=Choice(15, 17),
               levels=(Level(('storage', 'trading'), wall='masonry'),
                       Level(('living', 'kitchen'),
                             layout=Choice('open',
                                           'cross')), Level(('sleeping', 'study'), attic=True)),
               roof=Roof(pitch=1.0, ridge='x', dormers=Choice(1, 2))),
        Volume('tower',
               width=9,
               depth=9,
               join=Join('hall', 'north', Choice('front', 'back'), level=1),
               levels=(Level(('study',)), Level(('storage',)), Level(('study',))),
               circulation='ladder',
               roof=Roof(pitch=1.5, ridge='z')),
    ),
    materials=Materials(wall='plaster', frame='spruce', roof='slate', trim='spruce', accent='red'),
    entrance=Entrance('hall', level=1, bay=Choice('center', 'right')),
    attachments=(Attachment('terrace', 'hall', level=1, depth=3),
                 Attachment('market', 'hall', side='east', width=7, depth=5, cover='canopy')),
)

if __name__ == '__main__':
    run(DESIGN)
