I was trying to build the Tic Tac Toe Machine from here:
http://uberi.mesecons.net/projects/TicTacToe/index.htmlHowever it does not work.
I had to change the code for the push button Lua Controllers:
Below is the code for the lower row Lua Controller.
The lines we are concerned with is the "if" and "elseif" lines.
You will need to change the code in all 3 controllers
Old Code:
- Code: Select all
if event.type == "on" then
if event.pin == "A" then <--- Change this line to if pin.a then
digiline_send("press", "12")
elseif event.pin == "B" then <--- Change this line to if pin.b then
digiline_send("press", "11")
elseif event.pin == "D" then <--- Change this line to if pin.d then
digiline_send("press", "13")
end/join #a
end
New Code should look like this
- Code: Select all
if pin.a then
digiline_send("press", "12")
elseif pin.b then
digiline_send("press", "11")
elseif pin.d then
digiline_send("press", "13")
end
end
Also if you are using the WorldEdit file (TicTacToe.we) you will need to change the lua controller code for the lights indicating who's turn it is.
Old Code:
- Code: Select all
port.b = not pin.d
New Code:
- Code: Select all
if pin.d then
port.b = false
elseif not pin.d then
port.b = true
end
I needed to separate the lights from the push button switches and also from each other.

Here Is my build:

I hope this helps anyone wanting to use the wonderful game of Tic Tac Toe
I tested it with version 4.16 and it works.
Brackston