From 79ca66eb673c710432d1f4e51af70730a09a82c8 Mon Sep 17 00:00:00 2001 From: rubidium Date: Fri, 19 Sep 2014 20:06:51 +0000 Subject: (svn r26853) -Cleanup [Squirrel]: remove some stuff that we never did and especially never should use --- src/3rdparty/squirrel/samples/methcall.nut | 61 ------------------------------ 1 file changed, 61 deletions(-) delete mode 100644 src/3rdparty/squirrel/samples/methcall.nut (limited to 'src/3rdparty/squirrel/samples/methcall.nut') diff --git a/src/3rdparty/squirrel/samples/methcall.nut b/src/3rdparty/squirrel/samples/methcall.nut deleted file mode 100644 index 131d26228..000000000 --- a/src/3rdparty/squirrel/samples/methcall.nut +++ /dev/null @@ -1,61 +0,0 @@ -/*translation of the methcall test from The Great Computer Language Shootout -*/ - -Toggle <- { - bool=null -} - -function Toggle::value() { - return bool; -} - -function Toggle::activate() { - bool = !bool; - return this; -} - -function Toggle::new(startstate) { - local newo=clone this; - newo.bool = startstate; - return newo; -} - -NthToggle <- { - count_max=null - count=0 -} - -function NthToggle::new(start_state,max_counter) -{ - local newo=delegate ::Toggle.new(start_state) : clone this; - newo.count_max <- max_counter - return newo; -} - -function NthToggle::activate () -{ - count+=1 - if (count >= count_max) { - bool = !bool; - count = 0; - } - return this; -} - - -local n = ARGS.len()!=0?ARGS[0].tointeger():1 - -local val = 1; -local toggle = Toggle.new(val); -for (local i=0; i