Python code for the Zartix game