Code Duplication    Length = 29-29 lines in 2 locations

server/lib/ige/ospace/GalaxyGenerator.py 2 locations

@@ 227-255 (lines=29) @@
224
            Const.DISEASE_MUTANT : [(20, 45, 16), (5, 15, 12), (0, 5, 3)]
225
        }
226
227
class Circle65P(GalaxyTemplate):
228
    def __init__(self):
229
        super(Circle65P, self).__init__()
230
231
        self.scenario = Const.SCENARIO_OUTERSPACE
232
        self.minPlanets = 3200
233
        self.maxPlanets = 3500
234
        self.startR = (45.0, 52.5)
235
        self.players = 65
236
        self.playerGroup = 5
237
        self.groupDist = 8
238
        self.minR = 7.5
239
        # format {minRadius: density, nextCircleRadius: differentDensity}
240
        self.density = {7.5: 3, 10: 4, 20: 5, 30: 5.5, 60: 6, 75: 6}
241
        self.resources = {
242
            # format resourceID : [(minDist, maxDist, number of resources)]
243
            Const.SR_TL1A : [(20, 67.5, 45)],
244
            Const.SR_TL1B : [(20, 67.5, 45)],
245
            Const.SR_TL3A : [(10, 20, 10)],
246
            Const.SR_TL3B : [(10, 20, 10)],
247
            Const.SR_TL3C : [(10, 20, 10)],
248
            Const.SR_TL5A : [(7.5, 9, 2)],
249
            Const.SR_TL5B : [(7.5, 9, 2)],
250
            Const.SR_TL5C : [(7.5, 9, 2)]
251
        }
252
        self.diseases = {
253
            # format diseaseID : (minDist, maxDist, number of diseases)
254
            Const.DISEASE_MUTANT : [(20, 67.5, 32), (5, 15, 18), (0, 5, 6)]
255
        }
256
257
class Test(GalaxyTemplate):
258
    def __init__(self):
@@ 197-225 (lines=29) @@
194
            Const.DISEASE_MUTANT : [(13, 20, 6), (5, 9, 6)]
195
        }
196
197
class Circle42P(GalaxyTemplate):
198
    def __init__(self):
199
        super(Circle42P, self).__init__()
200
201
        self.scenario = Const.SCENARIO_OUTERSPACE
202
        self.minPlanets = 1500
203
        self.maxPlanets = 1800
204
        self.startR = (32.0, 36.0)
205
        self.players = 42
206
        self.playerGroup = 3
207
        self.groupDist = 4
208
        self.minR = 7.5
209
        # format {minRadius: density, nextCircleRadius: differentDensity}
210
        self.density = {7.5: 3, 10: 4, 20: 5, 30: 5.5, 40: 6, 50: 6}
211
        self.resources = {
212
            # format resourceID : [(minDist, maxDist, number of resources)]
213
            Const.SR_TL1A : [(20, 45, 15)],
214
            Const.SR_TL1B : [(20, 45, 15)],
215
            Const.SR_TL3A : [(8, 15, 7)],
216
            Const.SR_TL3B : [(8, 15, 7)],
217
            Const.SR_TL3C : [(8, 15, 7)],
218
            Const.SR_TL5A : [(7.5, 9, 1)],
219
            Const.SR_TL5B : [(7.5, 9, 1)],
220
            Const.SR_TL5C : [(7.5, 9, 1)]
221
        }
222
        self.diseases = {
223
            # format diseaseID : (minDist, maxDist, number of diseases)
224
            Const.DISEASE_MUTANT : [(20, 45, 16), (5, 15, 12), (0, 5, 3)]
225
        }
226
227
class Circle65P(GalaxyTemplate):
228
    def __init__(self):