// // TournamentEntries.swift // TournamentStats // // Created by Laurent Morvillier on 05/06/2019. // Copyright © 2019 Stax River. All rights reserved. // import Foundation struct TournamentRepresentable : HTMLRepresentable { var tournament: Tournament static func headers() -> [String] { return ["#", "Buy-in", "Event", "Prizepool", "Entries"] } func colums() -> [String] { return [ "\(tournament.number)", tournament.buyin.currencyFormatted, tournament.name, tournament.prizepool.currencyFormatted, "\(tournament.entries)" ] } static func htmlHeaders() -> String { var strings: [String] = [] // strings.append("Date") strings.append("#") strings.append("Buy-in") strings.append("Event") strings.append("Prizepool") strings.append("Entries") let all = strings.joined(separator: "") return "\(all)" } // func html() -> String { // var strings: [String] = [] //// strings.append(tournament.date.year) // strings.append("\(tournament.number)") // strings.append(tournament.buyin.currencyFormatted) // strings.append(tournament.name) // strings.append(tournament.prizepool.currencyFormatted) // strings.append("\(tournament.entries)") // let all = strings.joined(separator: "") // return "\(all)" // } }