Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
A jam submission

Color swapperView game page

A game for the TweetTweetJam
Submitted by Zhaojue (@ZhaojuEphastine) — 3 days, 8 hours before the deadline
Add to collection

Play game

Color swapper's itch.io page

How many characters of code did you use?
555

If you're comfortable with it, paste your game code here, so we can marvel at your achievement!
<html><head><title>Swap</title><style>p{display:inline-flex;flex-wrap:wrap}a{width:33%}a.n{color:red}</style></head><body><p></p><script>let d=document;let g=d.querySelector('p');let k='n';function s(){g.innerHTML='';for(let i=0;i<9;i++){let n=Math.round(Math.random());let c=`<a onclick="cl(this)"class="${n?k:''}">O</a>`;g.innerHTML+=c;};};function cl(e){e.classList.toggle(k);let p=e.previousSibling;let n=e.nextSibling;if(p){p.classList.toggle(k);}if(n){n.classList.toggle(k);}if(!d.querySelector('.n')){alert(':)');s();}};s();</script></body></html>

Leave a comment

Log in with itch.io to leave a comment.

Comments

No one has posted a comment yet