Author Topic: How to set condition to know next levels is break?  (Read 3458 times)

mcfrojd

  • Full Member
  • ***
  • Posts: 120
    • View Profile
How to set condition to know next levels is break?
« on: December 21, 2012, 07:34:54 PM »
I'm not sitting at the computer so I have no chance of testing right now.
But does someone know how to set the condition for a cell to know that next level will be brake 1, brake 2 or brake 3?

Today I have conditions that knows that after level 3 comes break 1 and after level 7 comes break 2 and so on.

But lately I've been forced to run different round schedule there maby break 2 have to come after level 8. So this messes my layout up.

Running a tournament tomorrow so I was hoping for a quick fix.

Corey Cooper

  • Administrator
  • Hero Member
  • *****
  • Posts: 5420
    • View Profile
Re: How to set condition to know next levels is break?
« Reply #1 on: December 21, 2012, 10:04:12 PM »
breakNum + 1

Before the first break, breakNum will be 0, so breakNum + 1 is 1, which is correct, since the next break will be the first break.

I'm not sure what you're trying to do, but as an example:

isRound and ((breakNum + 1) = 3)

This would evaluate to true for any round between breaks 2 and 3.


isRound and (not nextIsRound) and ((breakNum + 1) = 3)

This would evaluate to true only for the round just before break 3.

mcfrojd

  • Full Member
  • ***
  • Posts: 120
    • View Profile
Re: How to set condition to know next levels is break?
« Reply #2 on: December 22, 2012, 02:52:09 AM »
I want a cell that shows whats coming AFTER this round (ex 3), so if there is a break comming it says BREAK, if its next round comming it will say ROUND 4
I'm not sure why i "hard coded" this by making so many conditions before, i have conditions set like this now:

Standard condition="" Cell=<round offset="1">
Before break 1 condition="round number = 3" Cell=<break valueIfRound="1">
During break 1 condition="break number=1" Cell=<round offset="+1">

Before break 2 condition="round number = 7" Cell=<break valueIfRound="2">
During break 2 condition="break number=2" Cell=<round offset="+1">

Before break 3 condition="round number = 12" Cell=<break valueIfRound="3">
During break 3 condition="break number=3" Cell=<round offset="+1">

This "hardcoded" way gives me trouble when loading another round schedule where the breaks may be comming after round 4, 8 and 14.

Was hoping to have only 3 conditions set for that cell:

Standard condition="" Cell=<round offset="1">
Before break condition="?" Cell=<break valueIfRound="1">
During break condition="?" Cell=<round offset="+1">

So that no matter what round the break comes after the cell will work.
« Last Edit: December 22, 2012, 03:23:46 AM by mcfrojd »

Corey Cooper

  • Administrator
  • Hero Member
  • *****
  • Posts: 5420
    • View Profile
Re: How to set condition to know next levels is break?
« Reply #3 on: December 22, 2012, 09:11:21 PM »
The cell will need two Property Sets, the Default Property Set and one other.  I'll call it Breaks for the sake of this example.

For the Default Property Set, set the cell Contents to say: Round <round offset="+1">

For the other Property Set, set the cell Contents to say: Break
For this Property Set, set the Conditions to: not nextIsRound

The Breaks Property Set will only be used when the next level is not a round (and thus is a break).  When the next level is a round, the Default Property Set will be used.

mcfrojd

  • Full Member
  • ***
  • Posts: 120
    • View Profile
Re: How to set condition to know next levels is break?
« Reply #4 on: December 23, 2012, 05:15:39 AM »
Thanks, that is so obvious when you think about it.
Once again, Corey to the rescue..

mcfrojd

  • Full Member
  • ***
  • Posts: 120
    • View Profile
Re: How to set condition to know next levels is break?
« Reply #5 on: December 23, 2012, 06:05:14 AM »
When using token <break> it shows the number 0 when break 1, number 1 when break 2, and so on..
Tried to use <break offset="+1"> but that one didn't work.

I could settle for using the text "Break" only and not "Break #1" but it would be nice to have.

Corey Cooper

  • Administrator
  • Hero Member
  • *****
  • Posts: 5420
    • View Profile
Re: How to set condition to know next levels is break?
« Reply #6 on: December 24, 2012, 10:35:35 PM »
The <break> token has a value of 0 before the first break in the schedule.  It will have a value of 1 during the first break and continue to have a value of 1 until the second break in the schedule starts, when it will change to 2.

mcfrojd

  • Full Member
  • ***
  • Posts: 120
    • View Profile
Re: How to set condition to know next levels is break?
« Reply #7 on: December 26, 2012, 07:20:07 AM »
The <break> token has a value of 0 before the first break in the schedule.  It will have a value of 1 during the first break and continue to have a value of 1 until the second break in the schedule starts, when it will change to 2.

So that means that i cant get the upcoming break number in advance, because i cant use offset+1 on that token.

Corey Cooper

  • Administrator
  • Hero Member
  • *****
  • Posts: 5420
    • View Profile
Re: How to set condition to know next levels is break?
« Reply #8 on: December 26, 2012, 10:33:50 AM »
Yes, you can.  To display the upcoming break number, use the following in your layout:

<expression text="breakNum + 1">

dullgeek

  • Newbie
  • *
  • Posts: 24
    • View Profile
Re: How to set condition to know next levels is break?
« Reply #9 on: July 13, 2014, 10:40:15 AM »
Is there a way to determine before the next break whether or not it's a chip-up break? Basically in the "Next Antes / Blinds" area of my layout I want to display:

    Next: Break! Chip-up

When the break is a chip-up break and

    Next: Break!

When it's not. I think I can tell if the next round is a break by setting this condition:

   isRound and (not nextIsRound)

But I want to get a condition for determining when the nextround is also a chip-up round? Is there a test for that?

Corey Cooper

  • Administrator
  • Hero Member
  • *****
  • Posts: 5420
    • View Profile
Re: How to set condition to know next levels is break?
« Reply #10 on: July 22, 2014, 03:11:18 PM »
nextChipUp: 1 (true) if the next break has been designated as a Chip Up break.

So yes, you can.