PROJECT-tic-tac-toe



hints:

1) your code (modules 1 and 3) should create a tic-tac-toe.txt and exit with 
   a zero (ongoing game) if tic-tac-toe.txt does not yet exist. Browse for 
   the generated tic-tac-toe.txt on this site.

2) start your code after manually creating tic-tac-toe.txt with the following content
   and afterwards Browse for the generated tic-tac-toe.txt on this site.
1 2 1
2 1 1
2 1 2         	right click here to "save as" tic-tac-toe.txt

3) start your code after manually creating tic-tac-toe.txt with the following content
   and afterwards Browse for the generated tic-tac-toe.txt on this site.
1 4 0
2 1 2
7 0 1 		right click here to "save as" tic-tac-toe.txt

4) To create your own tic-tac-toe.txt on a Mac, open a terminal, and 
   type "(echo 1 2 0; echo 2 0 1; echo 0 1 0) > tic-tac-toe.txt" 
   To create your own tic-tac-toe.txt under Windows, use 
   Word- or Notepad (save as Text document .txt).
   Because your code should generate a tic-tac-toe.txt by itself, 
   there is however no need to generate any tic-tac-toe.txt manually, 
   except for the purpose of testing. For testing, you can also define
   the nxn matrix within your code instead of reading it from a file.

5) Once you uploaded your mymodule-x.py to the CODES directory, 
   edit main.tex. Delete unnecessary Executable: and Compile: 
   lines and add (if your python code is mymodule-x.py) 
   Executable: python mymodule-x.py; echo $?  
   This is the command to execute your code under linux and the
   echo $? statement ensures that the exit() content is returned as well.

Computational Thinking Lab HS 2025 ETH Zurich