Porn apps

Well, the subject might have definitely caught your attention. I was thinking about a piece of code that I saw and I could not help but think that if there was porn for a coder, what would it look like, and then it hit me, this is what it would look like.

[lua]function obj:touch(event)
print(“touch event”)
print(“event(”…event.phase)

if(event.phase == “ended”)
then
self.touched = self.touched-1
print(“Se acabo el movimiento”)
if(self.touched == 0)
then
print("Touchs "…self.touched)
self.speedX = 0
end
end

if(event.phase == “began”)
then

if(self.touched == 0 )
then
if(event.x>self.x)
then
self.touched = self.touched+1
self.speedX = 300

end
if(event.x<=self.x)
then
self.touched = self.touched+1
self.speedX = -300
end
print("Touchs "…self.touched)
end

end
Runtime:addEventListener(“touch”, obj)[/lua]

there is sooo much of touch and self.touch that I could not help but notice it… and it even has variable speeds… that change on the number of times self.touched

cheers,

?:slight_smile: [import]uid: 3826 topic_id: 13655 reply_id: 313655[/import]

Ha ha ha… I have seen this code somewhere… where did u get this from ? from any sample code ? [import]uid: 71210 topic_id: 13655 reply_id: 50129[/import]

I picked it up from some user, and I think you had re-written the same for all those touches and self.touch

cheers,

?:slight_smile: [import]uid: 3826 topic_id: 13655 reply_id: 50132[/import]

yea right right now I remember… hey did you notice my code is more funny. :slight_smile: [import]uid: 71210 topic_id: 13655 reply_id: 50135[/import]

I found this amusing, it’s actually quite clever. Good post :slight_smile: [import]uid: 52491 topic_id: 13655 reply_id: 50156[/import]