diff --git a/Making a Wargame.ipynb b/Making a Wargame.ipynb index dd0793b..8d466e9 100644 --- a/Making a Wargame.ipynb +++ b/Making a Wargame.ipynb @@ -712,6 +712,15 @@ "outputs": [], "source": [] }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [] + }, { "cell_type": "code", "execution_count": null, diff --git a/main.py b/main.py index 99585fa..31d0ac5 100644 --- a/main.py +++ b/main.py @@ -48,6 +48,7 @@ class StrategyGame(FloatLayout): class HexMapCell(label.Label): + def __init__(self, row=0, col=0, **kwargs): self.region_in_map = MapCoords(row, col) super(HexMapCell, self).__init__(**kwargs) diff --git a/strategygame.kv b/strategygame.kv index 728eebc..e7b7481 100644 --- a/strategygame.kv +++ b/strategygame.kv @@ -1,10 +1,10 @@ - +#:import math math #:include debug.kv : id: _game main_map: _main_map - map_rows: 10 + map_rows: 30 map_cols: 10 BoxLayout: orientation: 'horizontal' @@ -23,6 +23,7 @@ text: 'mini-map' size_hint: 1, .33 + : canvas: Color: @@ -51,3 +52,7 @@ Line: points: (self.right, self.y, self.right, self.top) width: 2 + +: + size_hint: 1, None + height: self.width / math.sqrt(3)