26 lines
546 B
Swift
26 lines
546 B
Swift
|
import Foundation
|
||
|
|
||
|
class AbstractTable {
|
||
|
|
||
|
/// The unique id of the table
|
||
|
let id: TableId
|
||
|
|
||
|
/// The name of the table
|
||
|
let name: TableName
|
||
|
|
||
|
/// Indicates that the table is visible to all players, and can be joined by anyone
|
||
|
let isPublic: Bool
|
||
|
|
||
|
init(table: AbstractTable) {
|
||
|
self.id = table.id
|
||
|
self.name = table.name
|
||
|
self.isPublic = table.isPublic
|
||
|
}
|
||
|
|
||
|
init(id: TableId, name: TableName, isPublic: Bool) {
|
||
|
self.id = id
|
||
|
self.name = name
|
||
|
self.isPublic = isPublic
|
||
|
}
|
||
|
}
|