# 🎮 WDC #17 Tic Tac Toe: The Next Generation

**URL:** <https://community.thunkable.com/t/wdc-17-tic-tac-toe-the-next-generation/1326767>\
**Category:** Teachers' Lounge\
**Tags:** wdc\
**Created:** [June 5, 2021, 9:50am UTC](https://community.thunkable.com/t/wdc-17-tic-tac-toe-the-next-generation/1326767 "2021-06-05T09:50:29Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![domhnallohanlon](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/domhnallohanlon/32/29554_2.png) [@domhnallohanlon](https://community.thunkable.com/u/domhnallohanlon)\
**Post date:** [June 5, 2021, 9:50am UTC](https://community.thunkable.com/t/wdc-17-tic-tac-toe-the-next-generation/1326767/1 "2021-06-05T09:50:29Z")

</div>

It’s Tic Tac Toe, but not as you know it - this challenge will require that you add an extra dimension to the traditional 3 x 3 game:

![small_gif](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/a/5/a5e2985abd65effb3fb28881b539debd607b071a.gif)

As you can see, each side has 6 players (plenty of scope for character design and development) and the larger players can “eat” smaller ones and take their place on the board (so a bit of logic is needed to implement this)

Will update this post over the weekend but hopefully this is enough to get you started!

---

<div class="post-metadata">

**Author:** ![domhnallohanlon](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/domhnallohanlon/32/29554_2.png) [@domhnallohanlon](https://community.thunkable.com/u/domhnallohanlon)\
**Post date:** [June 5, 2021, 9:50am UTC](https://community.thunkable.com/t/wdc-17-tic-tac-toe-the-next-generation/1326767/2 "2021-06-05T09:50:42Z")

</div>

Summary of entries

---

<div class="post-metadata">

**Author:** ![codeswept](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/codeswept/32/87755_2.png) [@codeswept](https://community.thunkable.com/u/codeswept)\
**Post date:** [June 5, 2021, 10:04am UTC](https://community.thunkable.com/t/wdc-17-tic-tac-toe-the-next-generation/1326767/3 "2021-06-05T10:04:00Z")

</div>

This seems interesting! Is there any specific name for this type of tic tac toe, so I can maybe google it and learn a bit more about it? I haven’t heard of this before.

---

<div class="post-metadata">

**Author:** ![domhnallohanlon](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/domhnallohanlon/32/29554_2.png) [@domhnallohanlon](https://community.thunkable.com/u/domhnallohanlon)\
**Post date:** [June 5, 2021, 10:35am UTC](https://community.thunkable.com/t/wdc-17-tic-tac-toe-the-next-generation/1326767/4 "2021-06-05T10:35:31Z")

</div>

Just PMd you a link!

---

<div class="post-metadata">

**Author:** ![codeswept](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/codeswept/32/87755_2.png) [@codeswept](https://community.thunkable.com/u/codeswept)\
**Post date:** [June 5, 2021, 10:36am UTC](https://community.thunkable.com/t/wdc-17-tic-tac-toe-the-next-generation/1326767/5 "2021-06-05T10:36:15Z")

</div>

Just saw that. Thanks!

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [June 5, 2021, 5:12pm UTC](https://community.thunkable.com/t/wdc-17-tic-tac-toe-the-next-generation/1326767/6 "2021-06-05T17:12:58Z")

</div>

We have this game at home and love it. It’ll be interesting to think of a way to implement it digitally.

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [June 5, 2021, 6:03pm UTC](https://community.thunkable.com/t/wdc-17-tic-tac-toe-the-next-generation/1326767/7 "2021-06-05T18:03:29Z")

</div>

To make a game like this well, we really need some Canvas improvements. For one, the ability to [detect a `mouse up` event](https://github.com/thunkable/thunkable-issues/issues/951) on a sprite would allow the user to drag and drop a game piece and then we could code snap-to-grid to set the piece where it needs to go.

---

<div class="post-metadata">

**Author:** ![catsarisky](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/catsarisky/32/100661_2.png) [@catsarisky](https://community.thunkable.com/u/catsarisky)\
**Post date:** [June 5, 2021, 6:37pm UTC](https://community.thunkable.com/t/wdc-17-tic-tac-toe-the-next-generation/1326767/8 "2021-06-05T18:37:20Z")

</div>

Couldn’t you use this?

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/e/c/ecc1ec202653f3802415a9060cea1aae41f465e3.png)

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [June 5, 2021, 6:47pm UTC](https://community.thunkable.com/t/wdc-17-tic-tac-toe-the-next-generation/1326767/9 "2021-06-05T18:47:51Z")

</div>

I thought I’d tried that a while ago but you’re right, that does detect a mouse up. Thanks!

I don’t think I can use the Canvas even with that block available.

Sprite positions are inconsistent:

> <https://github.com/thunkable/thunkable-issues/issues/880>
>
> \### Platform
> Thunkable X, drag-and-drop interface
> 
> \### Issue/Request Origin
> …Reported here: https://community.thunkable.com/t/0-1-0-1-0-010000000000002-error/1243946/4.
> 
> \### Steps to Reproduce
> 1. Drag a canvas onto a screen
> 2. Set the default sprite's y position to 0
> 3. Set a canvas label to the sprite's y position
> 
> \### Project Link
> https://x.thunkable.com/projects/6086334d789f82001225993e/c860a911-c7d9-48d8-be4e-6065cec35bf9/blocks
> https://x.thunkable.com/copy/a706d3bfa0d6da19f33e65f318765873
> 
> \### Expected Behavior
> The canvas label should show 0 (zero).
> 
> \### Actual Behavior
> The label shows 24.9874750125. And the Sprite is not positioned at y=0 but instead is at y=24.9874750125.
> \`\`\`
> STACK TRACE AND/OR SCREENSHOTS
> \`\`\`
> \<img width="400" alt="Screen Shot 2021-04-25 at 8 34 26 PM" src="https://user-images.githubusercontent.com/10355498/116025867-5326d300-a606-11eb-9305-ab9bf621b4ef.png"\>
> \<img width="175" alt="Screen Shot 2021-04-25 at 8 35 49 PM" src="https://user-images.githubusercontent.com/10355498/116025869-53bf6980-a606-11eb-89f7-d697145a69cc.png"\>

---

<div class="post-metadata">

**Author:** ![domhnallohanlon](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/domhnallohanlon/32/29554_2.png) [@domhnallohanlon](https://community.thunkable.com/u/domhnallohanlon)\
**Post date:** [June 5, 2021, 9:04pm UTC](https://community.thunkable.com/t/wdc-17-tic-tac-toe-the-next-generation/1326767/10 "2021-06-05T21:04:21Z")

</div>

I think the sprites use the mid point rather than the top left corner, right?

> [@tatiang](#):
>
> I don’t think I can use the Canvas

I think I’d use (lots of) buttons for this, simply because the last Tic Tac Toe game I built used 9 buttons.

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [June 5, 2021, 10:51pm UTC](https://community.thunkable.com/t/wdc-17-tic-tac-toe-the-next-generation/1326767/11 "2021-06-05T22:51:21Z")

</div>

> [@domhnallohanlon](#):
>
> I think the sprites use the mid point rather than the top left corner, right?

I guess I’d ask you that! 😆

The documentation I’ve read says that it’s the top-left corner. @jane said she would put in a request to change it to the center of the sprite.

But my findings [here](https://community.thunkable.com/t/sprite-positioning-when-canvas-loads/1327554/2) are really strange. Regardless of whether the x,y position is top-left or center, I’m seeing inconsistencies that prevent me from using the Canvas.

> [@domhnallohanlon](#):
>
> I think I’d use (lots of) buttons for this, simply because the last Tic Tac Toe game I built used 9 buttons.

That’s the way I’m heading, too… I just think a drag-and-drop game using the Canvas would be so much more satisfying.

---

<div class="post-metadata">

**Author:** ![human](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/human/32/101416_2.png) [@human](https://community.thunkable.com/u/human)\
**Post date:** [June 6, 2021, 1:13am UTC](https://community.thunkable.com/t/wdc-17-tic-tac-toe-the-next-generation/1326767/12 "2021-06-06T01:13:40Z")

</div>

> [@codeswept](#):
>
> so I can maybe google it and learn a bit more about it

@domhnallohanlon, could you give me the link too?

---

<div class="post-metadata">

**Author:** ![domhnallohanlon](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/domhnallohanlon/32/29554_2.png) [@domhnallohanlon](https://community.thunkable.com/u/domhnallohanlon)\
**Post date:** [June 6, 2021, 8:44am UTC](https://community.thunkable.com/t/wdc-17-tic-tac-toe-the-next-generation/1326767/13 "2021-06-06T08:44:03Z")

</div>

@human it seems like the rules might be a little more nuanced then the original animation I shared, but feel free to start simple and add additional complexity as you go:

> **[Gobblet Gobblers](https://boardgamegeek.com/boardgame/13230/gobblet-gobblers)**
>
> Gobblet Junior plays the same as Gobblet, but features a smaller 3x3 board (instead of a 4x4 board) with fewer pieces.
> 
> Your goal in Gobblet Junior is to place three of your pieces in a horizontal, vertical or diagonal row. Your pieces can stack on...

---

<div class="post-metadata">

**Author:** ![catsarisky](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/catsarisky/32/100661_2.png) [@catsarisky](https://community.thunkable.com/u/catsarisky)\
**Post date:** [June 6, 2021, 1:58pm UTC](https://community.thunkable.com/t/wdc-17-tic-tac-toe-the-next-generation/1326767/14 "2021-06-06T13:58:35Z")

</div>

Oh, interesting!

---

<div class="post-metadata">

**Author:** ![tchind](https://avatars.discourse-cdn.com/v4/letter/t/ebca7d/32.png) [@tchind](https://community.thunkable.com/u/tchind)\
**Post date:** [June 8, 2021, 8:54am UTC](https://community.thunkable.com/t/wdc-17-tic-tac-toe-the-next-generation/1326767/15 "2021-06-08T08:54:23Z")

</div>

Here is my (pre - entry )

[https://thunkable.site/w/aimEH84iX](https://thunkable.site/w/aimEH84iX)

---

<div class="post-metadata">

**Author:** ![codeswept](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/codeswept/32/87755_2.png) [@codeswept](https://community.thunkable.com/u/codeswept)\
**Post date:** [June 8, 2021, 10:27am UTC](https://community.thunkable.com/t/wdc-17-tic-tac-toe-the-next-generation/1326767/16 "2021-06-08T10:27:51Z")

</div>

![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/c/b/cbc16a1808b0cae83f4cd0d7c792519db2b8c1d9.png)

This is what I get.

---

<div class="post-metadata">

**Author:** ![tchind](https://avatars.discourse-cdn.com/v4/letter/t/ebca7d/32.png) [@tchind](https://community.thunkable.com/u/tchind)\
**Post date:** [June 8, 2021, 11:00am UTC](https://community.thunkable.com/t/wdc-17-tic-tac-toe-the-next-generation/1326767/17 "2021-06-08T11:00:52Z")

</div>

Fixed…  
Still working…dont understand now why it runs away

---

<div class="post-metadata">

**Author:** ![tchind](https://avatars.discourse-cdn.com/v4/letter/t/ebca7d/32.png) [@tchind](https://community.thunkable.com/u/tchind)\
**Post date:** [June 8, 2021, 11:01am UTC](https://community.thunkable.com/t/wdc-17-tic-tac-toe-the-next-generation/1326767/18 "2021-06-08T11:01:40Z")

</div>

[https://x.thunkable.com/copy/39fce0567e18e40ef66c7540d3ba9a0d](https://x.thunkable.com/copy/39fce0567e18e40ef66c7540d3ba9a0d)

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [June 8, 2021, 5:24pm UTC](https://community.thunkable.com/t/wdc-17-tic-tac-toe-the-next-generation/1326767/19 "2021-06-08T17:24:26Z")

</div>

This is what I see when I preview it in a browser:

![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/8/1/819d57fa3a4a3ea7b9bbe6b42ed54915885e8951.png)

The game seems to work… I can add Os and Xs. Is it just tic-tac-toe or did you code it like Gobblet?

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [June 9, 2021, 3:10am UTC](https://community.thunkable.com/t/wdc-17-tic-tac-toe-the-next-generation/1326767/20 "2021-06-09T03:10:23Z")

</div>

This challenge was a little too complex for me to complete over a weekend but I may revisit it another time. Keep these WDCs coming… so much fun to see everyone’s projects! 🙂

[Next page](https://community.thunkable.com/t/wdc-17-tic-tac-toe-the-next-generation/1326767.md?page=2)
