> For the complete documentation index, see [llms.txt](https://thientc9s-organization.gitbook.io/axie-jet/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://thientc9s-organization.gitbook.io/axie-jet/developers/documentations/interface-design.md).

# Interface Design

## State

```typescript
enum ItemStatus { AVAILABLE, UNAVAILABLE }

class CollectableItem {
  //TBD
}

class State {
  players: {
   player_id:{
     is_finished: boolean
     consumed_time: number
     distance: number
     y_axis: number
     gene: string
     velocity: {
       x_axis: number
       y_axis: number
     }
     items: CollectableItem[]
     //status: TBD
     collected_coins: number
   }
  }
  mystery_boxes: {
    x: number  //distance
    y: number  //y axis (pixel)
    status: ItemStatus
  }[],
  coins: [{
    x: number  //distance
    y: number  //y axis (pixel)
    status: ItemStatus
  }],
}

```

## Action

<pre class="language-typescript"><code class="lang-typescript"><strong>enum ActionType {USE_ITEM, KEY}
</strong>enum KeyId {UP, DOWN}
<strong>
</strong><strong>class Action {
</strong>   type: ActionType.USE_ITEM | ActionType.KEY
   // If type == MOVE
   keyId: KeyId.UP | KeyId.DOWN
   // If type == 
   item: number, //use nth item in player's items
   timestamp: number
}

</code></pre>

## Data

```typescript
class Data {
        obstacles: {
          type: number
          pattern_id: number
          x: number  //distance
          y: number  //y axis (pixel)
        }[],
       map: {
          length: number
       }
}

```
