0.3.0 • Published 7 months ago

scoresheet-models v0.3.0

Weekly downloads
-
License
ISC
Repository
github
Last release
7 months ago

Scoresheet Models

Tools for storing, rendering and parsing chess scoresheet models

Model representation

Premises

Chess scoresheet models are a small subset of general grids. Thus, their representation is succint. Here, we model models that follow these assumptions:

  • All boxes (aka cells) are equally-sized
  • All rows of boxes are contiguous
  • Boxes are grouped into blocks of 2 contiguous columns

Representation

Based on these premises, we can univocally define a model by:

  • Box (aka cell) width $w$
  • Number of rows $n$
  • Column offsets + blocks: $C = (x1,...,x{b1},\sqcup, x{b1+1}, ..., x{b2}, \sqcup, x{b_2+1}, ..., x_m)$

Column offsets representation

  • $x_i$ are offsets of extra columns (that belong to the grid but are not adjacent to any relevant cell)
  • Blanks ($\sqcup$) represent the positions where blocks go

Each block is composed of two columns of width $w$, so the actual column offsets can be obtained by replacing $\sqcup$'s by $w, w$

We refer to these expanded column offsets as $C_o$

Scale

For simplicity, we enforce a conventional grid size of $(1, 1)$. Thus, we require that:

$$\sum_{x\in C_o}x = 1$$ (sum of column offsets adds up to 1)

0.3.0

7 months ago

0.2.3

7 months ago

0.2.2

7 months ago

0.1.15

1 year ago

0.2.1

12 months ago

0.2.0

12 months ago

0.1.16

1 year ago

0.1.13

1 year ago

0.1.12

1 year ago

0.1.10

1 year ago

0.1.11

1 year ago

0.1.0

1 year ago

0.1.8

1 year ago

0.1.7

1 year ago

0.1.9

1 year ago

0.1.6

1 year ago

0.1.4

1 year ago

0.1.3

1 year ago

0.1.5

1 year ago

0.1.2

1 year ago

0.1.1

1 year ago