# 🎮 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:** 14\
**Page:** 2

<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 9, 2021, 4:21am UTC](https://community.thunkable.com/t/wdc-17-tic-tac-toe-the-next-generation/1326767/21 "2021-06-09T04:21:53Z")

</div>

It is just tic tac toe but a little advanced with chat and all

---

<div class="post-metadata">

**Author:** ![novice](https://avatars.discourse-cdn.com/v4/letter/n/a87d85/32.png) [@novice](https://community.thunkable.com/u/novice)\
**Post date:** [June 10, 2021, 5:42pm UTC](https://community.thunkable.com/t/wdc-17-tic-tac-toe-the-next-generation/1326767/22 "2021-06-10T17:42:13Z")

</div>

Hi All,

Tried making the very basic version of Goblet Tic tac toe-

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

This is a very basic version, so some bugs may stay, but the main version works… (i suppose). (This is the first time i heard of this version of tic tac toe…not sure if i understood all the rules correctly 😅)

So this game has 2 players - 1 Green, the other Red  
The bigger pieces can ‘eat up’ the smaller pieces and Red ones can capture Green and vice versa (if they are bigger).  
_One exception in the game rule is that - The player cannot move the piece what he has already played on the board to somewhere else on the board._  
_Once a piece is selected, the user has to play it, else he will not be able to use that piece again._

Could you guys give this a try?  
Please forgive me if this app takes a bit of time to load… i guess there are ways to shorten up the code.

---

<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 10, 2021, 9:54pm UTC](https://community.thunkable.com/t/wdc-17-tic-tac-toe-the-next-generation/1326767/23 "2021-06-10T21:54:26Z")

</div>

Looks pretty good! I’m not quite clear on your version… Gobblet usually has 3 piece sizes: small, medium and large. For each player, you have pieces numbered 1 to 6. How do these relate to the piece sizes? I was able to play a 6 on top of a 5… I assumed that wasn’t a legal move.

---

<div class="post-metadata">

**Author:** ![gkriti.1678n2l](https://avatars.discourse-cdn.com/v4/letter/g/f17d59/32.png) [@gkriti.1678n2l](https://community.thunkable.com/u/gkriti.1678n2l)\
**Post date:** [June 11, 2021, 2:48am UTC](https://community.thunkable.com/t/wdc-17-tic-tac-toe-the-next-generation/1326767/24 "2021-06-11T02:48:52Z")

</div>

(Novice here)  
Thanku for trying it out!!

Umm…so i followed the game shown in this video-

[![](https://img.youtube.com/vi/l8RIgagS8KI/maxresdefault.jpg "Episode 33: Gobblet Gobblers") ](https://www.youtube.com/watch?v=l8RIgagS8KI)

So basically, each player has 6 pieces from smallest piece to biggest.  
G1 is smallest and g6 is the largest ( as I tried to visually show with the size of buttons 😅)

The larger pieces can eat up the smaller pieces.  
_One exception in the game rule is that - The player cannot move the piece what he has already played on the board to somewhere else on the board._  
_Once a piece is selected, the user has to play it, else he will not be able to use that piece again._

Hope this helps…!

---

<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 11, 2021, 3:44am UTC](https://community.thunkable.com/t/wdc-17-tic-tac-toe-the-next-generation/1326767/25 "2021-06-11T03:44:23Z")

</div>

Yes but the pieces each player has are:

small, small, medium, medium, large, large

So I would expect something like:

1 1 2 2 3 3

instead of

1 2 3 4 5 6

I actually have this game at home. 😄

![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/d/7/d704937c2bccaa08b053ad3224fcf5cdae513dd5.jpeg)

---

<div class="post-metadata">

**Author:** ![gkriti.1678n2l](https://avatars.discourse-cdn.com/v4/letter/g/f17d59/32.png) [@gkriti.1678n2l](https://community.thunkable.com/u/gkriti.1678n2l)\
**Post date:** [June 11, 2021, 3:58am UTC](https://community.thunkable.com/t/wdc-17-tic-tac-toe-the-next-generation/1326767/26 "2021-06-11T03:58:39Z")

</div>

Ooopsie…!

I got that wrong!!

I ll fix that bug!!  
Thanku for pointing it out 😅👍

---

<div class="post-metadata">

**Author:** ![novice](https://avatars.discourse-cdn.com/v4/letter/n/a87d85/32.png) [@novice](https://community.thunkable.com/u/novice)\
**Post date:** [June 11, 2021, 8:24am UTC](https://community.thunkable.com/t/wdc-17-tic-tac-toe-the-next-generation/1326767/29 "2021-06-11T08:24:24Z")

</div>

Here is the next version of the Gobblet Tic tac toe with corrections done as pointed out by @tatiang

[https://x.thunkable.com/copy/8eefaefa449a125c3e92659df6786586](https://x.thunkable.com/copy/8eefaefa449a125c3e92659df6786586)

 ![Screenshot 2021-06-11 at 1.52.56 PM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/e/6/e6f9708fb6159082e92e8a74a48b9864ed99e3aa.png)  
 ![Screenshot 2021-06-11 at 1.53.08 PM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/5/f/5ffc8267031e2b5de71d6b22a23e9c84b877b788.png)  
 ![Screenshot 2021-06-11 at 1.53.17 PM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/2/9/292afbe35f25dde0a761840ae613747488c40fb1.png)  
 ![Screenshot 2021-06-11 at 1.53.37 PM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/4/9/4943f323ef08311636a20130b52f741c7db73638.png)

---

<div class="post-metadata">

**Author:** ![manyone](https://avatars.discourse-cdn.com/v4/letter/m/ee59a6/32.png) [@manyone](https://community.thunkable.com/u/manyone)\
**Post date:** [June 11, 2021, 9:49am UTC](https://community.thunkable.com/t/wdc-17-tic-tac-toe-the-next-generation/1326767/30 "2021-06-11T09:49:29Z")

</div>

here are a few screen shots of my version showing player 1 making move “A1” and player 2 responds with move “B8”. you can make a move by tapping on an origin button then tapping on a destination button then pressing “Make Move”. a player can only move a piece of his own color, from his rack or from the board into a blank space or cover (or gobble) the opponent’s piece (other color) of smaller size. i did not implement the “undo” feature - once a piece covers another it overrides that piece. i’m still working on the check for win. (the illustration is not an actual game - i just added a few pieces here and there to test the move validation and board update routine).

 ![tic copy](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/f/a/fa90cf27d3744af660ca243b38becca9826ab614.jpeg)

---

<div class="post-metadata">

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

</div>

This is a whole new level of tic tac toe than what we used to play in the past. This is just amazing!!!

---

<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 11, 2021, 3:37pm UTC](https://community.thunkable.com/t/wdc-17-tic-tac-toe-the-next-generation/1326767/32 "2021-06-11T15:37:39Z")

</div>

I like how you replicated the concentric circle design.

---

<div class="post-metadata">

**Author:** ![manyone](https://avatars.discourse-cdn.com/v4/letter/m/ee59a6/32.png) [@manyone](https://community.thunkable.com/u/manyone)\
**Post date:** [June 11, 2021, 4:19pm UTC](https://community.thunkable.com/t/wdc-17-tic-tac-toe-the-next-generation/1326767/33 "2021-06-11T16:19:00Z")

</div>

i couldn’t find any nice-looking set of nested circles in the wingdings font so i settled for those images - and anyway, it’s the size that matters in the game - the graphic is just a hint that there’s something nested (gobbled) inside.

---

<div class="post-metadata">

**Author:** ![manyone](https://avatars.discourse-cdn.com/v4/letter/m/ee59a6/32.png) [@manyone](https://community.thunkable.com/u/manyone)\
**Post date:** [June 11, 2021, 10:03pm UTC](https://community.thunkable.com/t/wdc-17-tic-tac-toe-the-next-generation/1326767/34 "2021-06-11T22:03:34Z")

</div>

here’s my TicTacToe DisCovery game!

i call it DisCovery because you use a DISC to COVER the other pieces while playing… never mind.

[https://x.thunkable.com/copy/6582ffddd9bac5c4855c82b479572017](https://x.thunkable.com/copy/6582ffddd9bac5c4855c82b479572017)

anyway here are the rules.

1. player 1 always starts, default color is blue. (there is an option in Preferences where Player 1’s color can be changed but i haven’t thoroughly tested that yet).
2. you make a move by tapping on an origin spot then tap on a destination spot then press “Make Move” button. if you make a mistake in tapping, do it again until you’ve entered the correct end points.
3. you can only move a piece of your own color, from your rack or from the board.
4. you can place it on a blank spot or you can place it over an existing piece on the board only if your piece is larger than the target piece and the target piece is of the opponent’s color. once you cover an opponent’s piece, it’s gone - there’s no undo function.
5. you cannot return a piece from the board back to the rack.
6. the first player to get 3 pieces of the same color wins. (after a win, allow a couple of seconds for the game to reset)

(i haven’t tested the cases where no more moves can be made or no winner found after all pieces have been played)

enjoy!

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

i had a lot of aha moments while writing this game.

1. i use a simple 2-digit scheme to represent a piece, eg. piece 13 is owned by player 1 and it’s largest of the 3 sizes. piece 21 is owned by player 2, the smallest size. a zero on the board means it’s empty. validating moves is done by comparing numbers.
2. the pieces i use for displaying are plain characters! i found the alt codes from the net and simply entered them into a 3-byte string and i substring into it based on which piece i’m displaying.
3. in order to display them in different sizes, i set the component’s font size to a function based on the size of the piece.
4. i use a 3x3 magic square mapped to the 3x3 board to look for pieces of the same color whose weights add up to 15 (see the row of X’s below)  
 ![TICTAC2](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/c/4/c4a4b369cf854f7431a668ce2df3712f6b9c5cbf.jpeg)

---

<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 11, 2021, 11:31pm UTC](https://community.thunkable.com/t/wdc-17-tic-tac-toe-the-next-generation/1326767/35 "2021-06-11T23:31:43Z")

</div>

> [@manyone](#):
>
> i had a lot of aha moments while writing this game.

I love these insights! It’s probably my favorite part of WDCs… thanks for sharing them. I think we can all learn from each other. There are so many different ways to program something and you found a really interesting, efficient and logical way to do that.

---

<div class="post-metadata">

**Author:** ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)\
**Post date:** [November 8, 2024, 1:22pm UTC](https://community.thunkable.com/t/wdc-17-tic-tac-toe-the-next-generation/1326767/36 "2024-11-08T13:22:04Z")

</div>

Closed on November 8, 2024, 1:22pm UTC



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