Jump to content




BBTetris

game

26 replies to this topic

#21 Bomb Bloke

    Hobbyist Coder

  • Moderators
  • 7,099 posts
  • LocationTasmania (AU)

Posted 18 November 2013 - 07:09 AM

View Posttheoriginalbit, on 17 November 2013 - 06:45 PM, said:

But its local to the else block, so it will be discarded when the else block is finished.
I got most of the way to work before realising that's what your answer would be... not 'cause I remembered that's how it worked so much as I figured out that you wouldn't ask if it didn't.

I have a memory of testing that out, but not a whit of memory as to what the result was. I must've shuffled that code in there later on thinking I knew what I was doing.

View Posttheoriginalbit, on 17 November 2013 - 06:45 PM, said:

Yeh I'm more talking about lines 1246-1251
... and while at work I probably spent too much of my time refreshing Pastebin so I could review those lines (it was "under heavy load" most of the day, apparently).

Anyway, yeah, that's a good spot for it. :)

View PostSymmetryc, on 17 November 2013 - 08:23 PM, said:

One way to do OOP (or something resembling it) would be to do something like this (your implementation of blocks is probably way different, but you can probably get the idea of what I'm talking about):
That's actually near identical, yes - a table of the things with a few variables to keep track of which is in use, and where it is.

I do get how OOP would be implemented here (my worry re function duplication wouldn't've applied even if true, given that I only have one block on screen at a time), what I don't get is the "why" (... given that I only have one block on screen at a time). But thanks.

I suspect it boils down to what one's familiar with, or one's personal style. For example, I find the system of applying functions to button objects a right nuisance to read, because although it's very clear that there's a selection of buttons and the program is checking to see if any have been clicked, it becomes a royal nuisance to work out what they do - I'd rather have all that code in the one place then spread out at intervals throughout the source. It's like the difference between reading a regular book or a "choose your own adventure" novel to me, and when a function is only called from one specific place in the code then the whole thing seems like a waste of time.

Dunno.

#22 theoriginalbit

    Semi-Professional ComputerCrafter

  • Moderators
  • 7,332 posts
  • LocationAustralia

Posted 18 November 2013 - 07:18 AM

View PostBomb Bloke, on 18 November 2013 - 07:09 AM, said:

I got most of the way to work before realising that's what your answer would be... not 'cause I remembered that's how it worked so much as I figured out that you wouldn't ask if it didn't.

I have a memory of testing that out, but not a whit of memory as to what the result was. I must've shuffled that code in there later on thinking I knew what I was doing.
Haha, well you definitely don't need it ;P

View PostBomb Bloke, on 18 November 2013 - 07:09 AM, said:

... and while at work I probably spent too much of my time refreshing Pastebin so I could review those lines (it was "under heavy load" most of the day, apparently).

Anyway, yeah, that's a good spot for it. :)
of course it would be xP

#23 Symmetryc

  • Members
  • 434 posts

Posted 18 November 2013 - 02:21 PM

View PostBomb Bloke, on 18 November 2013 - 07:09 AM, said:

View PostSymmetryc, on 17 November 2013 - 08:23 PM, said:

One way to do OOP (or something resembling it) would be to do something like this (your implementation of blocks is probably way different, but you can probably get the idea of what I'm talking about):
That's actually near identical, yes - a table of the things with a few variables to keep track of which is in use, and where it is.

I do get how OOP would be implemented here (my worry re function duplication wouldn't've applied even if true, given that I only have one block on screen at a time), what I don't get is the "why" (... given that I only have one block on screen at a time). But thanks.

I suspect it boils down to what one's familiar with, or one's personal style. For example, I find the system of applying functions to button objects a right nuisance to read, because although it's very clear that there's a selection of buttons and the program is checking to see if any have been clicked, it becomes a royal nuisance to work out what they do - I'd rather have all that code in the one place then spread out at intervals throughout the source. It's like the difference between reading a regular book or a "choose your own adventure" novel to me, and when a function is only called from one specific place in the code then the whole thing seems like a waste of time.

Dunno.
Each to their own I guess :)

#24 mineo72

  • Members
  • 4 posts

Posted 14 December 2013 - 12:56 PM

This is Cool

#25 Bomb Bloke

    Hobbyist Coder

  • Moderators
  • 7,099 posts
  • LocationTasmania (AU)

Posted 14 December 2013 - 09:52 PM

Thank you. :)

#26 Agoldfish

  • Members
  • 451 posts
  • LocationSome Fish Bowl in Ohio.

Posted 18 January 2014 - 02:19 AM

I really hope Dan adds this in the treasure disk library. I love it! +1 for you, sire.

EDIT: 100TH POST! WOO!

Edited by LeGoldFish, 18 January 2014 - 04:19 PM.


#27 Bomb Bloke

    Hobbyist Coder

  • Moderators
  • 7,099 posts
  • LocationTasmania (AU)

Posted 07 July 2014 - 01:39 PM

Eeheeheeheehee.







1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users