# com.minomobi.lab.score

> Published by [minomobi.com](https://lexicon.garden/identity/did:plc:gd6m4mw3km2betcnbbs6362q)

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:gd6m4mw3km2betcnbbs6362q/com.minomobi.lab.score)
- [Documentation](https://lexicon.garden/lexicon/did:plc:gd6m4mw3km2betcnbbs6362q/com.minomobi.lab.score/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:gd6m4mw3km2betcnbbs6362q/com.minomobi.lab.score/examples)

## Definitions

### `com.minomobi.lab.score`

**Type**: `record`

A result worth comparing, from a site at minomobi.com. Kept apart from com.minomobi.lab.doc because a leaderboard needs a numeric field with a known sort direction, and burying that inside an opaque `data` blob makes the records uncomparable — which is the one thing a score is for. Written to the PLAYER'S OWN repository: there is no lab-side scoreboard, so a site builds one by reading the repos of players a visitor NAMED (their own, their follows, handles they typed). That constraint is deliberate and matches the factory's rule that a page may show media for a subject the visitor named, and not from a stream nobody chose.

**Key**: `any`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `game` | `string` | No | Mode or level within the site, when one site has several scoreboards. |
| `site` | `string` | Yes | The lab site's slug. The record key must begin with it, so two sites cannot overwrite each other. |
| `unit` | `string` | No | What `value` counts: 'points', 'ms', 'moves', 'lines'. Without it a reader can render a number and not a result. |
| `value` | `integer` | Yes | The score. An integer so that comparison is exact — a time in milliseconds, not seconds as a float. |
| `detail` | `string` | No | Short context for the run: 'level 7, 3 lines'. |
| `createdAt` | `string` (datetime) | Yes |  |
| `higherIsBetter` | `boolean` | No | Which end of the sort wins. A time-attack board and a points board are the same record with this flipped, and a reader that assumes descending will rank the slowest player first. |

## Raw Schema

```json
{
  "id": "com.minomobi.lab.score",
  "defs": {
    "main": {
      "key": "any",
      "type": "record",
      "record": {
        "type": "object",
        "required": [
          "site",
          "value",
          "createdAt"
        ],
        "properties": {
          "game": {
            "type": "string",
            "maxLength": 64,
            "description": "Mode or level within the site, when one site has several scoreboards."
          },
          "site": {
            "type": "string",
            "maxLength": 32,
            "description": "The lab site's slug. The record key must begin with it, so two sites cannot overwrite each other."
          },
          "unit": {
            "type": "string",
            "maxLength": 32,
            "description": "What `value` counts: 'points', 'ms', 'moves', 'lines'. Without it a reader can render a number and not a result."
          },
          "value": {
            "type": "integer",
            "description": "The score. An integer so that comparison is exact — a time in milliseconds, not seconds as a float."
          },
          "detail": {
            "type": "string",
            "maxLength": 1000,
            "description": "Short context for the run: 'level 7, 3 lines'.",
            "maxGraphemes": 100
          },
          "createdAt": {
            "type": "string",
            "format": "datetime"
          },
          "higherIsBetter": {
            "type": "boolean",
            "default": true,
            "description": "Which end of the sort wins. A time-attack board and a points board are the same record with this flipped, and a reader that assumes descending will rank the slowest player first."
          }
        }
      },
      "description": "A result worth comparing, from a site at minomobi.com. Kept apart from com.minomobi.lab.doc because a leaderboard needs a numeric field with a known sort direction, and burying that inside an opaque `data` blob makes the records uncomparable — which is the one thing a score is for. Written to the PLAYER'S OWN repository: there is no lab-side scoreboard, so a site builds one by reading the repos of players a visitor NAMED (their own, their follows, handles they typed). That constraint is deliberate and matches the factory's rule that a page may show media for a subject the visitor named, and not from a stream nobody chose."
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
