<!--
{
  "availability" : [
    "visionOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "TabletopKit",
  "identifier" : "/documentation/TabletopKit/TableSnapshot",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "TabletopKit"
    ],
    "preciseIdentifier" : "s:11TabletopKit13TableSnapshotV"
  },
  "title" : "TableSnapshot"
}
-->

# TableSnapshot

A snapshot of the current state of the table.

```
struct TableSnapshot
```

## Topics

### Getting the table entity

[`var tableEntity: Entity?`](/documentation/TabletopKit/TableSnapshot/tableEntity)

### Getting information on seats

[`var turn: Set<TableSeatIdentifier>`](/documentation/TabletopKit/TableSnapshot/turn)

[`var seats: [any TableSeat]`](/documentation/TabletopKit/TableSnapshot/seats)

[`var seatIDs: [TableSeatIdentifier]`](/documentation/TabletopKit/TableSnapshot/seatIDs)

[`func seat<S>(of: S.Type, for: Player) -> (S, S.State)?`](/documentation/TabletopKit/TableSnapshot/seat(of:for:))

[`func seat<S>(of: S.Type, matching: TableSeatIdentifier) -> (S, S.State)?`](/documentation/TabletopKit/TableSnapshot/seat(of:matching:))

[`func seats<S>(of: S.Type) -> [(S, S.State)]`](/documentation/TabletopKit/TableSnapshot/seats(of:))

[`func state<E>(for: E) -> E.State`](/documentation/TabletopKit/TableSnapshot/state(for:))

[`func state(matching: TableSeatIdentifier) -> (any SeatState)?`](/documentation/TabletopKit/TableSnapshot/state(matching:)-ear2)             

[`func entity(forSeat: some EntityTableSeat) -> Entity?`](/documentation/TabletopKit/TableSnapshot/entity(forSeat:))

[`func entity(matching: TableSeatIdentifier) -> Entity?`](/documentation/TabletopKit/TableSnapshot/entity(matching:)-7ps7s)

### Getting cursors

[`var cursors: [TableCursor]`](/documentation/TabletopKit/TableSnapshot/cursors)

[`func cursor(matching: TableCursorIdentifier) -> TableCursor?`](/documentation/TabletopKit/TableSnapshot/cursor(matching:))

[`func cursor(controlling: EquipmentIdentifier) -> TableCursor?`](/documentation/TabletopKit/TableSnapshot/cursor(controlling:))

Returns the cursor corresponding to an interaction controlling the given equipment ID,
or `nil` if no such cursors could be found.

[`func cursors(forPlayer: Player) -> [TableCursor]`](/documentation/TabletopKit/TableSnapshot/cursors(forPlayer:))

[`func cursors(hovering: EquipmentIdentifier) -> [TableCursor]`](/documentation/TabletopKit/TableSnapshot/cursors(hovering:))

[`func cursors(controlling: some Sequence<EquipmentIdentifier>) -> [TableCursor]`](/documentation/TabletopKit/TableSnapshot/cursors(controlling:))

Finds and returns all the cursors corresponding to an interactions controlling any of the
given equipment IDs. Duplicate equipment IDs are ignored.

[`func cursors(for: Player) -> [TableCursor]`](/documentation/TabletopKit/TableSnapshot/cursors(for:))

Finds and returns all the cursors corresponding to an interactions owned by the given player.

[`func cursors(matching: TabletopInteraction.Identifier) -> [TableCursor]`](/documentation/TabletopKit/TableSnapshot/cursors(matching:))

Finds and returns all the cursors corresponding to a given interaction.

### Getting information on equipment

[`func equipment<E>(of: E.Type) -> [(E, E.State)]`](/documentation/TabletopKit/TableSnapshot/equipment(of:))

[`func equipment<E>(of: E.Type, childrenOf: some Equipment) -> [(E, E.State)]`](/documentation/TabletopKit/TableSnapshot/equipment(of:childrenOf:)-4z4s1)   

[`func equipment<E>(of: E.Type, childrenOf: EquipmentIdentifier) -> [(E, E.State)]`](/documentation/TabletopKit/TableSnapshot/equipment(of:childrenOf:)-5w137)   

[`func equipment<E>(of: E.Type, matching: some Sequence<EquipmentIdentifier>) -> [(E, E.State)]`](/documentation/TabletopKit/TableSnapshot/equipment(of:matching:)-7ai0c)     

[`func equipment<E>(of: E.Type, matching: EquipmentIdentifier) -> (E, E.State)?`](/documentation/TabletopKit/TableSnapshot/equipment(of:matching:)-8qve2)     

[`func equipmentIDs() -> [EquipmentIdentifier]`](/documentation/TabletopKit/TableSnapshot/equipmentIDs())

[`func equipmentIDs(childrenOf: some Equipment) -> [EquipmentIdentifier]`](/documentation/TabletopKit/TableSnapshot/equipmentIDs(childrenOf:)-432sk)   

[`func equipmentIDs(childrenOf: EquipmentIdentifier) -> [EquipmentIdentifier]`](/documentation/TabletopKit/TableSnapshot/equipmentIDs(childrenOf:)-f1sp)   

[`func state(matching: EquipmentIdentifier) -> (any EquipmentState)?`](/documentation/TabletopKit/TableSnapshot/state(matching:)-u35k)             

[`func entity(matching: EquipmentIdentifier) -> Entity?`](/documentation/TabletopKit/TableSnapshot/entity(matching:)-vb9w)

[`func entity(forEquipment: some EntityEquipment) -> Entity?`](/documentation/TabletopKit/TableSnapshot/entity(forEquipment:))

### Getting score counters

[`var counters: [ScoreCounter]`](/documentation/TabletopKit/TableSnapshot/counters)

[`func counter(matching: ScoreCounter.ID) -> ScoreCounter?`](/documentation/TabletopKit/TableSnapshot/counter(matching:))

## Relationships

### Conforms To

[`Escapable`](/documentation/Swift/Escapable)

[`Copyable`](/documentation/Swift/Copyable)

[`CustomDebugStringConvertible`](/documentation/Swift/CustomDebugStringConvertible)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)