> For the complete documentation index, see [llms.txt](https://kgisl.gitbook.io/lab3003/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://kgisl.gitbook.io/lab3003/docs/board.md).

# Board

Board class to represent the game board

## Methods

### **init**

#### Parameters

| name | description | default |
| ---- | ----------- | ------- |
| self |             |         |
| m    |             |         |
| n    |             |         |
| init |             |         |

### **str**

return the **str** representation of a Board object \* represents a live cell, and a space represents a dead one

#### Parameters

| name | description | default |
| ---- | ----------- | ------- |
| self |             |         |

### population

population — the number of live cells on the board

#### Parameters

| name | description | default |
| ---- | ----------- | ------- |
| self |             |         |

### count\_live\_neighbours

count the live neighbours of a cell

#### Parameters

| name | description | default |
| ---- | ----------- | ------- |
| self |             |         |
| x    |             |         |
| y    |             |         |

### next\_cell\_state

#### Parameters

| name | description | default |
| ---- | ----------- | ------- |
| self |             |         |
| x    |             |         |
| y    |             |         |

### next\_board\_state

return board configuration for the next state

#### Parameters

| name | description | default |
| ---- | ----------- | ------- |
| self |             |         |

### advance\_state

update the board configuration with the config for the next state

#### Parameters

| name | description | default |
| ---- | ----------- | ------- |
| self |             |         |

### has\_live\_cells

return whether there are any live cells or not

#### Parameters

| name | description | default |
| ---- | ----------- | ------- |
| self |             |         |
