├── README.md ├── index.html ├── index.js ├── package.json ├── tic-tac-tweet.gif ├── tweet.html └── tweet.png /README.md: -------------------------------------------------------------------------------- 1 | # Tic-Tac-Tweet 2 | 3 | Tic Tac Toe in a Tweet - A simplified version of the classic game in exactly 140 characters of HTML and JavaScript. The playfield is represented by 3x3 text-input fields. Instead of using `x` and `o`, this version uses the binary representations `0` and `1`. 4 | 5 | ### Original Tweet 6 | 7 | https://twitter.com/aemkei/status/625784268996890624 8 | 9 | ![Tweet](https://raw.githubusercontent.com/aemkei/tic-tac-tweet/master/tweet.png) 10 | 11 | ### Demo 12 | 13 | [PLAY THE DEMO](http://rawgit.com/aemkei/tic-tac-tweet/master/tweet.html)! 14 | 15 | ### Instructions 16 | 17 | Click a field to set the next mark. The game will only allow a new placement if the field was empty. Once the player marked three fields (horizontal, vertical, or diagonal) and alert will show the winner. 18 | 19 | ### Gameplay Video 20 | 21 | ![Tic-Tac-Tweet](https://raw.githubusercontent.com/aemkei/tic-tac-tweet/master/tic-tac-tweet.gif) 22 | 23 | ### Tweet Sized HTML (140 characters) 24 | 25 | ```html 26 | 27 | ``` 28 | 29 | ### Uncompressed Source (163 bytes) 30 | 31 | ```js 32 | for(a=[i=12];i;a[i]=9,R=/(0|1)(\1|..(\1|.\1. 33 | |..\1..)..)\1/)document.write(--i%4?"
") 36 | ``` 37 | 38 | ### Thanks 39 | 40 | RegEx by https://gist.github.com/Davidebyzero/9090628, compressed using http://xem.github.io/obfuscatweet. 41 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | Tic-Tac-Tweet - game in 140 characters 2 | 3 |
 4 | Tic-Tac-Toe - HTML game in 140 characters
 5 | 
 6 | 
7 | Source (140 chars) 8 | 9 | <svg onload=eval(unescape(escape('𩡯𬠨𨐽𦱝𛁩🐱𜠻𛐭𪐻𨑛𪑝🐹𛁒🐯𚀰𯀱𚐨𧀱𯀮𛠨𧀱𯀮𧀱𛡼𛠮𧀱𛠮𚐮𛠩𧀱𛰩𩁯𨱵𫑥𫡴𛡷𬡩𭁥𚁩𙐴🰢🁩𫡰𭑴𘁯𫡣𫁩𨱫👶𨑬𭑥𯁼𚁡𦰢𚱩𚰢𧐽𭡡𫁵𩐽𪑞🐱𚐻𤠮𭁥𬱴𚁡𛡪𫱩𫠨𙰧𚐩𙠦𨑬𩑲𭀨𪐩🠢𞠢🁢𬠾𘠩').replace(/uD./g,'')))> 10 | 11 |
12 | Uncompressed (159 bytes): 13 | for(a=[i=12];i;a[i]=9)document.write(--i%4?"<input onclick=value?0:a["+i+"]=value=i^=1;"+/(0|1)(\1|..(\1|.\1.|..\1..)..)\1/+".test(a.join``)&&alert(i)>":"<p>") 14 | 15 | -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | for(a=[i=12];i;a[i]=9)document.write(--i%4?"":"

") 2 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "tic-tac-tweet", 3 | "description": "HTML game in 140 characters" 4 | } 5 | -------------------------------------------------------------------------------- /tic-tac-tweet.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aemkei/tic-tac-tweet/c0b6b9670de904f5c2938b968b532c16ef37e234/tic-tac-tweet.gif -------------------------------------------------------------------------------- /tweet.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tweet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aemkei/tic-tac-tweet/c0b6b9670de904f5c2938b968b532c16ef37e234/tweet.png --------------------------------------------------------------------------------