#!/usr/local/bin/python
# Code Fights Chess Board Cell Color Problem


def chessBoardCellColor(cell1, cell2):
    pass


def main():
    tests = [
        ["A1", "C3", True],
        ["A1", "H3", False],
        ["A1", "A2", False],
        ["A1", "B2", True],
        ["B3", "H8", False],
        ["C3", "B5", False],
        ["G5", "E7", True],
        ["C8", "H8", False],
        ["D2", "D2", True],
        ["A2", "A5", False]
    ]

    for t in tests:
        res = chessBoardCellColor(t[0], t[1])
        if t[2] == res:
            print("PASSED: chessBoardCellColor({}, {}) returned {}"
                  .format(t[0], t[1], res))
        else:
            print("FAILED: chessBoardCellColor({}, {}) returned {}, answer: {}"
                  .format(t[0], t[1], res, t[2]))


if __name__ == '__main__':
    main()

@@ -111,12 +111,375 @@
     
-pass
+'''%0A    Determine if the two given cells on chess board are same color%0A    A, C, E, G odd cells are same color as B, D, F, H even cells%0A    '''%0A    def get_color(cell):%0A        return (%22DARK%22 if (cell%5B0%5D in %22ACEG%22 and int(cell%5B1%5D) %25 2 == 1) or%0A                (cell%5B0%5D in %22BDFH%22 and int(cell%5B1%5D) %25 2 == 0) else %22LIGHT%22)%0A    return get_color(cell1) == get_color(cell2)
 %0A%0A%0Ad

Solve chess board cell color problem