Ternary Operators

Add to
My games
Add to
Wishlist
Save to
Collection
No reviews
Exceptional
Meh
Skip

About

Keys

Z - Toggle the alive/dead state
X - Show/hide the logic

Code

Below is an implementation of the code in the above explanation. For it to be useful, you need two different sprites in #001 and #002.

function _init() a=true --alive? b=1 --sprite:alive c=2 --sprite:dead x,y=60,60 end function _update() if (btnp(4)) a=not a --flip/flop a end function _draw() spr(a and b or c,x,y) end
Platforms
Release date
Developer
MBoffin
Age rating
Not rated
Tags

System requirements for Web

Read more...
Ternary Operators screenshot, image №1180050 - RAWG
Edit the game info
Last Modified: Jan 9, 2019

Where to buy

itch.io