Ad
  • Custom User Avatar

    In sample tests generation2 has 8 elements.
    populate() method gets called and right after that test checks print_state() and expects 12 elements instead of 8. How count of elements may change without calling the move(), or how it can increase even with move()? It seems like mistake in generation2 data. When I replaced generation2 input, all sample tests get passed.

    Given:

    generation2 = [
    	{'x':5,'y':4,'size':3},
    	{'x':8,'y':6,'size':15},
    	{'x':1,'y':4,'size':4},
    	{'x':2,'y':7,'size':9},
    	{'x':9,'y':0,'size':10},
    	{'x':3,'y':5,'size':4},
    	{'x':7,'y':2,'size':6},
    	{'x':3,'y':3,'size':2}]
    

    Corrected:

    generation2 = [
    	{'x':5,'y':4,'size':3},
      {'x':2,'y':4,'size':13},
      {'x':6,'y':4,'size':7},
      {'x':6,'y':2,'size':4},
      {'x':6,'y':1,'size':8},
    	{'x':8,'y':6,'size':15},
    	{'x':1,'y':4,'size':4},
    	{'x':2,'y':7,'size':9},
    	{'x':9,'y':0,'size':10},
    	{'x':3,'y':5,'size':4},
    	{'x':7,'y':2,'size':6},
    	{'x':3,'y':3,'size':5}]
    

    Can you check if mistake present in tests?
    Also I can't correct full (remote) tests, so I can't pass them.