# 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 |             |         |
