Notifications
Clear all

[Closed] warm-up before challenge #5

this is not a tool… technically the code is idle (there is no using for a practical purpose). so i’ve decided to encrypt it.

try to find right colors by drag-n-dropping their labels:

21 Replies

hey, people! this is not a free food. give me at least your score… i might be dumb but it takes ~2min for me to Riddle the riddle…

first loading the script it took me at least 20 seconds to work out what to do… so i restarted and got 1 min 54. process of elimination and then some guessing came into it

EDIT: second attempt 5.01 … I think i got lucky with some of the names last time…

2 Replies
(@denist)
Joined: 11 months ago

Posts: 0

i call it intuitive interface…

(@denist)
Joined: 11 months ago

Posts: 0

… and English is your native language…
Gainsboro… heh…

 lo1

At 4 AM: 5:00
At 10 AM: 1:28

1 Reply
(@denist)
Joined: 11 months ago

Posts: 0

it’s easy to explain… the morning is much more colorful than the night

 lo1

I am getting better

Took me a while to figure out how it worked but then on the first try

2:08 w00t

Nice game Denis

hah nice one

1 Reply
 lo1
(@lo1)
Joined: 11 months ago

Posts: 0

Yeah ok, so I may have cheated

here is my cheating device

global roll_colorGuesser
try (destroyDialog roll_colorGuesser) catch ()
rollout roll_colorGuesser "I know what color is it"
(
-- Local Variable Declerations
------------------------------------------
	
	local w = 70
	local h = 30
	local dnc = dotnetclass "System.Drawing.Color"
	local colors = #(
		#AliceBlue,
		#AntiqueWhite,
		#Aqua,
		#Aquamarine,
		#Azure,
		#Beige,
		#Bisque,
		#Black,
		#BlanchedAlmond,
		#Blue,
		#BlueViolet,
		#Brown,
		#BurlyWood,
		#CadetBlue,
		#Chartreuse,
		#Chocolate,
		#Coral,
		#CornflowerBlue,
		#Cornsilk,
		#Crimson,
		#Cyan,
		#DarkBlue,
		#DarkCyan,
		#DarkGoldenrod,
		#DarkGray,
		#DarkGreen,
		#DarkKhaki,
		#DarkMagenta,
		#DarkOliveGreen,
		#DarkOrange,
		#DarkOrchid,
		#DarkRed,
		#DarkSalmon,
		#DarkSeaGreen,
		#DarkSlateBlue,
		#DarkSlateGray,
		#DarkTurquoise,
		#DarkViolet,
		#DeepPink,
		#DeepSkyBlue,
		#DimGray,
		#DodgerBlue,
		#Firebrick,
		#FloralWhite,
		#ForestGreen,
		#Fuchsia,
		#Gainsboro,
		#GhostWhite,
		#Gold,
		#Goldenrod,
		#Gray,
		#Green,
		#GreenYellow, 
		#Honeydew,
		#HotPink,
		#IndianRed,
		#Indigo,
		#Ivory,
		#Khaki,
		#Lavender,
		#LavenderBlush,
		#LawnGreen,
		#LemonChiffon,
		#LightBlue,
		#LightCoral,
		#LightCyan,
		#LightGoldenrodYellow,
		#LightGray,
		#LightGreen,
		#LightPink,
		#LightSalmon,
		#LightSeaGreen,
		#LightSkyBlue,
		#LightSlateGray,
		#LightSteelBlue,
		#LightYellow,
		#Lime,
		#LimeGreen,
		#Linen,
		#Magenta,
		#Maroon,
		#MediumAquamarine,
		#MediumBlue,
		#MediumOrchid,
		#MediumPurple,
		#MediumSeaGreen,
		#MediumSlateBlue,
		#MediumSpringGreen,
		#MediumTurquoise,
		#MediumVioletRed,
		#MidnightBlue,
		#MintCream,
		#MistyRose,
		#Moccasin,
		#NavajoWhite,
		#Navy,
		#OldLace,
		#Olive,
		#OliveDrab,
		#Orange,
		#OrangeRed,
		#Orchid,
		#PaleGoldenrod,
		#PaleGreen,
		#PaleTurquoise,
		#PaleVioletRed,
		#PapayaWhip,
		#PeachPuff,
		#Peru,
		#Pink,
		#Plum,
		#PowderBlue,
		#Purple,
		#Red,
		#RosyBrown,
		#RoyalBlue,
		#SaddleBrown,
		#Salmon,
		#SandyBrown,
		#SeaGreen,
		#SeaShell,
		#Sienna,
		#Silver,
		#SkyBlue,
		#SlateBlue,
		#SlateGray,
		#Snow,
		#SpringGreen,
		#SteelBlue,
		#Tan,
		#Teal,
		#Thistle,
		#Tomato,
		#Transparent,
		#Turquoise,
		#Violet,
		#Wheat,
		#White,
		#WhiteSmoke,
		#Yellow,
		#YellowGreen
	)

-- User Interface
------------------------------------------
	
	edittext etxColor ""
	listBox lbxColors ""
	bitmap bmpColor "" width:w height:h visible:false

-- Functions
------------------------------------------

	fn getColors txt =
	(
		if txt.count > 0 then
			for c in colors where matchPattern (toLower (c as string)) pattern:((toLower txt) + "*") collect c as string
		else
			#()
	)
	
	fn updateColor =
	(
		if lbxColors.selection > 0 then (
			local c = dnc.FromName lbxColors.selected
			bmpColor.bitmap = bitmap w h color:(color c.r c.g c.b)
			bmpColor.visible = true
		) else
			bmpColor.visible = false
	)
	
	fn checkColor txt =
	(
		lbxColors.items = getColors txt
		if lbxColors.items.count > 0 and lbxColors.selection == 0 then 
			lbxColors.selection = 1
		updateColor()
	)
	
	fn openDialog =
	(
		createDialog roll_colorGuesser width:200
	)
	
	fn init =
	(
		setFocus etxColor
	)

	fn done =
	(
		gc light:true
	)

-- Event Handlers
------------------------------------------

	on etxColor changed arg do checkColor arg
	on lbxColors selected arg do updateColor()
	on roll_colorGuesser open do init()
	on roll_colorGuesser close do done()

) -- end of rollout

roll_colorGuesser.openDialog()

this is a scripting challenge after all so lets see if someone can come up with a better way to cheat! (and not just print screen and edit in ps)

Dont need photoshop to cheat, the game is reconfigured randomly, can be he clicked new game until it got 16 correct at once. And even then, very lucky heh

If I’m not mistaking the odds would be 1 : 2004189184
for that and in that case the time should be 00:00:00… Denis, you should have used a random picker that gives 0 matches in initial state

2 Replies
 lo1
(@lo1)
Joined: 11 months ago

Posts: 0

How is this calculated? I thought it’s supposed to be !16 = 20,922,789,888,000 ?

(@matanh)
Joined: 11 months ago

Posts: 0

Right it is 16! (20,922,789,888,000)
At first I quickly calculated it using mxs with integers but I guess it was to big for an int, walframe alpha confirms your number :shrug:

Page 1 / 2