From: <che...@us...> - 2007-05-26 07:11:43
|
Revision: 451 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=451&view=rev Author: chef_koch Date: 2007-05-26 00:11:42 -0700 (Sat, 26 May 2007) Log Message: ----------- minor code cleanup Modified Paths: -------------- trunk/plugins/MySimon/Source/SimonSay/MySimon.cs Modified: trunk/plugins/MySimon/Source/SimonSay/MySimon.cs =================================================================== --- trunk/plugins/MySimon/Source/SimonSay/MySimon.cs 2007-05-26 07:11:12 UTC (rev 450) +++ trunk/plugins/MySimon/Source/SimonSay/MySimon.cs 2007-05-26 07:11:42 UTC (rev 451) @@ -265,42 +265,42 @@ private void OnBtnStart() { - if ((!PlayerOn) && (!SimonOn)) - { + if (PlayerOn) + return; + if (SimonOn) + return; - test = false; + test = false; - Random randObj = new Random(); - for (int i = 0; i <= 99; i++) - { // do random colors for 100 rounds - Code[i] = (int)(randObj.NextDouble() * 4); - } + Random randObj = new Random(); + for (int i = 0; i <= 99; i++) + { // do random colors for 100 rounds + Code[i] = (int)(randObj.NextDouble() * 4); + } - // set timebase for game - switch (_currentLevel) - { - case Level.Easy: - timeBase = 20; - break; - case Level.Medium: - timeBase = 10; - break; - case Level.Hard: - timeBase = 4; - break; - } + // set timebase for game + switch (_currentLevel) + { + case Level.Easy: + timeBase = 20; + break; + case Level.Medium: + timeBase = 10; + break; + case Level.Hard: + timeBase = 4; + break; + } + timeActual = timeBase; + Reset(); - timeActual = timeBase; - Reset(); + //init round + round = 0; + cnt = 0; + //simonn starts + SimonOn = true; - //init round - round = 0; - cnt = 0; - //simonn starts - SimonOn = true; - } - UpdateButtonStates(); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |