import { List } from '../list/list' ; import { Card } from '../card/card' ; export class Board { constructor ( private name , private lists = new Array < List > ( ) , private defaultList = new List ( ) ) { } addDefaultList ( cards ? ) { if ( this . lists . length > 0 ) { let card = this . getAllCards ( ) ; this . defaultList . addCard ( ... cards ) ; } else { this . defaultList = new List ( 'Default List' , cards ) ; this . lists . unshift ( this . defaultList ) ; } } addList ( name , cards ? ) { this . lists . push ( new List ( name , cards ) ) ; } getAllCards ( ) { let cards = this . lists . reduce ( ( x , y ) => x . addCard ( y . getCards ( ) ) ) ; return cards ; } getLists ( ) { return this . lists . slice ( 0 ) ; } notRepeated ( cards ) { } }