All pastes #51530 Raw Edit

MDWeezer

public text v1 · immutable
#51530 ·published 2006-04-26 16:04 UTC
rendered paste body
- (void)startClockEngine:(id) sender
{
	[levelsDrawer close];
	int i;
	int numRows = [levelTable numberOfRows];
	while(i < numRows)
	{
		// Call function startTimer and pass the following 4 variables
		NSLog(@"Small Blind: %@",[[[levelArray arrangedObjects] objectAtIndex:i] valueForKey:@"smallBlind"]);
		NSLog(@"Big Blind: %@",[[[levelArray arrangedObjects] objectAtIndex:i] valueForKey:@"bigBlind"]);
		NSLog(@"Ante: %@",[[[levelArray arrangedObjects] objectAtIndex:i] valueForKey:@"ante"]);
		NSLog(@"Length: %@",[[[levelArray arrangedObjects] objectAtIndex:i] valueForKey:@"length"]);
		++i;
	}
}

- (void)startTimer (int)ante: anteValue
			   (int)bigBlind: bigBlindValue
			 (int)smallBlind: smallBlindValue
				 (int)length: lengthValue
{
	// Convert length (which is in minutes) to seconds
	// Display values bigBlindValue, smallBlindValue and lengthValue using bindings - ALL SET
	// Create NSTimer that will fire every second and call updateDisplay:, upating the display, counting down until zero
	// When the display hits 00:00:00 return to while loops and get info from next row in the table
	// Repeat until you hit the last row
}

- (void)updateDisplay
{
	// Subtract a second from the length
	// Math to convert seconds to hours/minutes/sec NSString 
	// Display string
}