def test015(self): userParms = {} userParms['grid'] = '0000004024402020' userParms['score'] = 4 userParms['direction'] = 'back' userParms[ 'integrity'] = '2A2EF0D1BEA22B9D6AB67C482BFF954F93F6A3617EF052E11DD8776BFFB7325A' result = {} result['status'] = 'error: invalid direction' self.assertEqual(result, shift._shift(userParms))
def test016(self): userParms = {} userParms['grid'] = '248163264128256248163264128256' userParms['score'] = 9600 userParms['direction'] = 'down' userParms[ 'integrity'] = 'E57CC76136B59F8F687EA8EDE132F8AA63D3F77E690080133885AAC5AE5EE549' result = {} result['status'] = 'error: no shift possible' self.assertEqual(result, shift._shift(userParms))
def test014(self): userParms = {} userParms['grid'] = '0000004024402020' userParms['score'] = 4 userParms['direction'] = 'down' userParms[ 'integrity'] = 'B942E8D41B41814866B32EA9C9A3A4205ABA77148D86741D1EFE765BE6FEAADB' result = {} result['status'] = 'error: bad integrity value' self.assertEqual(result, shift._shift(userParms))
def test013(self): userParms = {} userParms['grid'] = '0000004024402020' userParms['score'] = 33 userParms['direction'] = 'down' userParms[ 'integrity'] = '1875F39BCE84620F9B3273BE921EFF1E541FEAEE10EBBF0858DB30ADF10BE2A9' result = {} result['status'] = 'error: invalid score' self.assertEqual(result, shift._shift(userParms))
def test011(self): userParms = {} userParms['grid'] = '2248161632010245120000052' userParms['score'] = 4 userParms['direction'] = 'down' userParms[ 'integrity'] = '9CE182F636152306A87BC22CDA94C8607A925E584FCF34F5896B393ACCAFD6EF' result = {} result['status'] = 'error: invalid grid' self.assertEqual(result, shift._shift(userParms))
def test09(self): userParms = {} userParms['grid'] = '' userParms['score'] = 4 userParms['direction'] = 'down' userParms[ 'integrity'] = '2A2EF0D1BEA22B9D6AB67C482BFF954F93F6A3617EF052E11DD8776BFFB7325A' result = {} result['status'] = 'error: missing grid' self.assertEqual(result, shift._shift(userParms))
def test02(self): userParms = {} userParms['grid'] = '0000004024402020' userParms['score'] = 4 userParms[ 'integrity'] = '2A2EF0D1BEA22B9D6AB67C482BFF954F93F6A3617EF052E11DD8776BFFB7325A' result = {} result['grid'] = '4000000000804420' result['score'] = 16 result[ 'integrity'] = '96AE2C09F18145AB3B76655B47F6F9B902A48077B2DB9D365D747A801981B949' result['status'] = 'ok' self.assertEqual(result, shift._shift(userParms))
def test06(self): userParms = {} userParms['grid'] = '1024102400000000000000' userParms['score'] = 129024 userParms['direction'] = 'LeFT' userParms[ 'integrity'] = '18FF0FE71EB8CCFA82556511578B321D0B69A8E2FD5202EBD3A949EB35CB3C45' result = {} result['grid'] = '2048000000000000002' result['score'] = 131072 result[ 'integrity'] = '51A7C485E859A94F5FFCCB25C682A66D8671ABB9AF1682756233C17499B4DE68' result['status'] = 'win' self.assertEqual(result, shift._shift(userParms))
def test05(self): userParms = {} userParms['grid'] = '2481632641282562481632641280' userParms['score'] = 9600 userParms['direction'] = 'DOWN' userParms[ 'integrity'] = 'CBD6F924B76E41871F106ABDE80AF9BA71350A53B0A148F26F16AF14CA5F6B06' result = {} result['grid'] = '2482326412816248256326412816' result['score'] = 9600 result[ 'integrity'] = 'EA619F71A389DC0C3770E5DA79B405E81EA25B0E841D90176714B101C5E792E7' result['status'] = 'lose' self.assertEqual(result, shift._shift(userParms))
def test04(self): userParms = {} userParms['grid'] = '2222444488881616160' userParms['score'] = 9600 userParms['direction'] = 'Up' userParms[ 'integrity'] = '66457746F0596CEE48B4FA4FA9C57A8A56A917F5B42F2600F12CD4266B9098BE' result = {} result['grid'] = '2222444488881616164' result['score'] = 9600 result[ 'integrity'] = 'D0322C9B4DCAE2E0001F7BF3F24EFFE875038EA2A81660F77D14C29D7D960685' result['status'] = 'ok' self.assertEqual(result, shift._shift(userParms))
def test03(self): userParms = {} userParms['grid'] = '2222444488881616160' userParms['score'] = 9600 userParms['direction'] = 'LEFT' userParms[ 'integrity'] = '66457746F0596CEE48B4FA4FA9C57A8A56A917F5B42F2600F12CD4266B9098BE' result = {} result['grid'] = '44008800161600321602' result['score'] = 9688 result[ 'integrity'] = 'FD4750403CBC401D7FC64E9ADCCEF7B24981481A24CFB23F274F3DC38B524883' result['status'] = 'ok' self.assertEqual(result, shift._shift(userParms))
def test01(self): userParms = {} userParms['grid'] = '0020000020000000' userParms['score'] = 0 userParms['direction'] = '' userParms[ 'integrity'] = '7CD5E3DEAB08FCAE8F64433DC4A63CC922571EBF60EE1D1938ADCD415FB760E5' result = {} result['grid'] = '0000004000002020' result['score'] = 0 result[ 'integrity'] = '0DA3DEE7C5D13224BA4937CCF213B29C57676C36CDFE1C5CFC86ED069C644A17' result['status'] = 'ok' self.assertEqual(result, shift._shift(userParms))