Combine unit and research functions
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
from collections import defaultdict
|
||||
|
||||
from aoe.types import *
|
||||
|
||||
|
||||
@@ -7,7 +9,7 @@ class Production():
|
||||
|
||||
# assumes for now each unit can be built in only one type of building
|
||||
def __init__(self):
|
||||
self.building = {
|
||||
self.building = defaultdict(None, {
|
||||
Units.VILLAGER: Buildings.TOWNCENTER,
|
||||
Units.TRADECART: Buildings.MARKET,
|
||||
Units.SPEARMAN: Buildings.BARRACKS,
|
||||
@@ -93,4 +95,4 @@ class Production():
|
||||
Research.LOOM: Buildings.TOWNCENTER,
|
||||
Research.SAPPERS: Buildings.CASTLE,
|
||||
Research.BOMBARDTOWER: Buildings.UNIVERSITY,
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user