Lesson 2: Tic Tac Toe
Make a simple version of the game, with 2 human players. Covers making canvas widgets with the drawing tools, copying images between canvases, and other fun tricks.
Deck: ttt-1-basics
Lesson 2: Tic Tac Toe
Make a simple version of the game, with 2 human players. Covers making canvas widgets with the drawing tools, copying images between canvases, and other fun tricks.
Deck: ttt-1-basics
Nice video!
The ".." notation can simplify a few of these scripts a bit. Instead of writing
each c in selected c.draggable:0 end
You can use this shorthand:
selected..draggable:0
The same goes for this example:
each w in cx,co w.show:"none" end
Form a list, and then use ".." notation to write the attribute for each element in the list:
(cx,co)..show:"none"