1. Keep track of when you last rolled a six. 2. When you roll a six, check how long ago it has been since you rolled the last six. If you think about it, you'll find it's really simple to calculate "how long ago". Only trick is how to set a value for "never". So, if the span between the two sixes is too short, just ignore the last six rolled.