@@ -283,59 +283,3 @@ def test_strategy(self):
283
283
self .versus_test (axl .MockPlayer (actions = [D , D , C , C ]),
284
284
expected_actions = actions ,
285
285
init_kwargs = {"n" : 1 , "d" : 1 , "c" : 1 })
286
-
287
- def test_edge_case_n_is_zero (self ):
288
- # Always uses grudge response.
289
- init_kwargs = {'n' : 0 }
290
- grudge_response_d = [(D , D )] * 4 + [(C , D )] * 2
291
- grudge_response_c = [(D , C )] * 4 + [(C , C )] * 2
292
-
293
- opponent = axl .Defector ()
294
- actions = grudge_response_d * 5
295
- self .versus_test (opponent , expected_actions = actions ,
296
- init_kwargs = init_kwargs )
297
-
298
- opponent = axl .Cooperator ()
299
- actions = grudge_response_c * 5
300
- self .versus_test (opponent , expected_actions = actions ,
301
- init_kwargs = init_kwargs )
302
-
303
- def test_edge_case_d_is_zero (self ):
304
- # Grudge response is only C, so acts like Cooperator.
305
- init_kwargs = {'d' : 0 }
306
-
307
- opponent = axl .Defector ()
308
- actions = [(C , D )] * 5
309
- self .versus_test (opponent , expected_actions = actions ,
310
- init_kwargs = init_kwargs )
311
-
312
- opponent = axl .Alternator ()
313
- actions = [(C , C ), (C , D )] * 5
314
- self .versus_test (opponent , expected_actions = actions ,
315
- init_kwargs = init_kwargs )
316
-
317
- def test_edge_case_c_is_zero (self ):
318
- # Grudge response is a set number of D's (defaults to 4)
319
- init_kwargs = {'c' : 0 }
320
-
321
- opponent = axl .Defector ()
322
- actions = [(C , D )] + [(D , D )] * 10
323
- self .versus_test (opponent , expected_actions = actions ,
324
- init_kwargs = init_kwargs )
325
-
326
- opponent_actions = [C ] * 10 + [D ]
327
- opponent = axl .MockPlayer (actions = opponent_actions )
328
- actions_start = [(C , C )] * 10 + [(C , D )]
329
- subsequent = [(D , C )] * 4 + [(C , C )] * 6 + [(C , D )]
330
- actions = actions_start + subsequent * 5
331
- self .versus_test (opponent , expected_actions = actions ,
332
- init_kwargs = init_kwargs )
333
-
334
- def test_repr (self ):
335
- default_player = self .player ()
336
- self .assertEqual (repr (default_player ),
337
- "General Soft Grudger: n=1,d=4,c=2" )
338
-
339
- set_params_player = self .player (n = 2 , d = 3 , c = 4 )
340
- self .assertEqual (repr (set_params_player ),
341
- "General Soft Grudger: n=2,d=3,c=4" )
0 commit comments