Obviously if it's wrong, return to default state.
Now there's an example below I just wrote up whilst actually writing this topic. I want some more experienced developers to let me know if this is a good way/bad way/totally wrong way and how I could possibly improve it.
Code:
var/list/example_list = list()
obj
proc
check_list()
for(var/obj/P in example_list)
if(P.picked == src.picked) //picked is a var from another proc for icon_state.
//do what needs to be done and then remove P from the list
return
tile
Click()
if(!clicked)
if(!example_list.len)
example_list.Add(src)
else
src.check_list()
So I mostly got the code to work with my game. I'm having one problem at the minute which is figuring out why the second clicked tile won't go to default state or win state.
Have a look.