Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2012
    Posts
    1
    Rep Power
    0

    Default Need to solve this formula for my project

    I'm working on modifying a tetris game for my ISU for grade 11 computer science, and I've been stuck on this one modification. The original game will level up after 20 lines cleared, but i want mine to level up at 5, then 10, 15, etc. right now i have
    if (board.hasFullLines ())
    {
    board.removeFullLines ();
    if (level < 9 && board.getRemovedLines () / 5 > level)
    {
    level = board.getRemovedLines () / 5;
    handleLevelModification ();
    }
    }
    This levels up at 8 lines cleared (idk why), then 15, 20, 25, etc. so 8, 7, 5, 5 or something like that. I need to modify this formula so it goes up by 5, the original is here
    if (board.hasFullLines()) {
    board.removeFullLines();
    if (level < 9 && board.getRemovedLines() / 20 > level) {
    level = board.getRemovedLines() / 20;
    handleLevelModification();
    }
    } else {
    handleFigureStart();
    }

    if you can post a suggestion i'll try it to see if it works, thanks!

  2. #2
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,244
    Rep Power
    19

    Default Re: Need to solve this formula for my project

    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

Similar Threads

  1. Kwadratic formula
    By BURNY26 in forum New To Java
    Replies: 20
    Last Post: 03-26-2012, 04:31 PM
  2. Formula Logic Help
    By sehudson in forum New To Java
    Replies: 4
    Last Post: 03-11-2011, 04:17 AM
  3. Formula class
    By imorio in forum New To Java
    Replies: 3
    Last Post: 02-23-2011, 09:38 PM
  4. What is the formula?
    By yuchuang in forum New To Java
    Replies: 3
    Last Post: 04-30-2007, 10:00 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •