Merge branch 'dorian' of https://github.com/llfkj/gamecamp into llfkj

This commit is contained in:
Amy Wooding 2016-06-04 15:10:39 -07:00
commit a7fd74e3d3
3 changed files with 17 additions and 2 deletions

View File

@ -712,6 +712,15 @@
"outputs": [], "outputs": [],
"source": [] "source": []
}, },
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": null, "execution_count": null,

View File

@ -48,6 +48,7 @@ class StrategyGame(FloatLayout):
class HexMapCell(label.Label): class HexMapCell(label.Label):
def __init__(self, row=0, col=0, **kwargs): def __init__(self, row=0, col=0, **kwargs):
self.region_in_map = MapCoords(row, col) self.region_in_map = MapCoords(row, col)
super(HexMapCell, self).__init__(**kwargs) super(HexMapCell, self).__init__(**kwargs)

View File

@ -1,10 +1,10 @@
#:import math math
#:include debug.kv #:include debug.kv
<StrategyGame>: <StrategyGame>:
id: _game id: _game
main_map: _main_map main_map: _main_map
map_rows: 10 map_rows: 30
map_cols: 10 map_cols: 10
BoxLayout: BoxLayout:
orientation: 'horizontal' orientation: 'horizontal'
@ -23,6 +23,7 @@
text: 'mini-map' text: 'mini-map'
size_hint: 1, .33 size_hint: 1, .33
<BU>: <BU>:
canvas: canvas:
Color: Color:
@ -51,3 +52,7 @@
Line: Line:
points: (self.right, self.y, self.right, self.top) points: (self.right, self.y, self.right, self.top)
width: 2 width: 2
<HexMapCell>:
size_hint: 1, None
height: self.width / math.sqrt(3)