annotate gamelib/research.py @ 4:5e21bf2b6853

Fix very basics of research and products.
author Jeremy Thurgood <firxen@gmail.com>
date Sun, 06 May 2012 12:00:09 +0200
parents 6ab4f1ab9eab
children f9756477cbce
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3
6ab4f1ab9eab Very basics of research and products.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff changeset
1 class ResearchArea(object):
6ab4f1ab9eab Very basics of research and products.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff changeset
2 NAME = None
6ab4f1ab9eab Very basics of research and products.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff changeset
3 PREREQUISITES = ()
6ab4f1ab9eab Very basics of research and products.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff changeset
4
6ab4f1ab9eab Very basics of research and products.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff changeset
5 def __init__(self):
6ab4f1ab9eab Very basics of research and products.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff changeset
6 self.points = 0
6ab4f1ab9eab Very basics of research and products.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff changeset
7
6ab4f1ab9eab Very basics of research and products.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff changeset
8 def spend_points(self, points):
6ab4f1ab9eab Very basics of research and products.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff changeset
9 self.points += points
6ab4f1ab9eab Very basics of research and products.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff changeset
10
6ab4f1ab9eab Very basics of research and products.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff changeset
11
6ab4f1ab9eab Very basics of research and products.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff changeset
12 class Tesla(ResearchArea):
6ab4f1ab9eab Very basics of research and products.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff changeset
13 NAME = "Tesla"
6ab4f1ab9eab Very basics of research and products.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff changeset
14
6ab4f1ab9eab Very basics of research and products.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff changeset
15
6ab4f1ab9eab Very basics of research and products.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff changeset
16 class Robotics(ResearchArea):
6ab4f1ab9eab Very basics of research and products.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff changeset
17 NAME = "Robotics"
6ab4f1ab9eab Very basics of research and products.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff changeset
18
6ab4f1ab9eab Very basics of research and products.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff changeset
19
6ab4f1ab9eab Very basics of research and products.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff changeset
20 class Rocketry(ResearchArea):
6ab4f1ab9eab Very basics of research and products.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff changeset
21 NAME = "Rocketry"
6ab4f1ab9eab Very basics of research and products.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff changeset
22
6ab4f1ab9eab Very basics of research and products.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff changeset
23
6ab4f1ab9eab Very basics of research and products.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff changeset
24 class BioGenetics(ResearchArea):
6ab4f1ab9eab Very basics of research and products.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff changeset
25 NAME = "Biogenetics"
6ab4f1ab9eab Very basics of research and products.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff changeset
26
6ab4f1ab9eab Very basics of research and products.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff changeset
27
6ab4f1ab9eab Very basics of research and products.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff changeset
28 class Space(ResearchArea):
6ab4f1ab9eab Very basics of research and products.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff changeset
29 NAME = "SPAAAAAACE!"
6ab4f1ab9eab Very basics of research and products.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff changeset
30 PREREQUISITES = (
4
5e21bf2b6853 Fix very basics of research and products.
Jeremy Thurgood <firxen@gmail.com>
parents: 3
diff changeset
31 (Robotics, 1),
5e21bf2b6853 Fix very basics of research and products.
Jeremy Thurgood <firxen@gmail.com>
parents: 3
diff changeset
32 (Rocketry, 2),
3
6ab4f1ab9eab Very basics of research and products.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff changeset
33 )