dominos and design pattern exercise