Posted 10 February 2014 - 12:17 PM
I've gotten stuck on this problem a few times now when trying to make some contraptions with computercraft, And i just can't wrap my head around a good way to solve it.
This is a simple paint drawing of the problem:
The thingy to the left is a drawing of a multiple layered table, and the drawing on the right is a container with the colors i got. I want to get the green color, but i dont have one in my chest, So ill have to mix a blue and yellow color to get the green, i dont have thoose either so i need to go to the next layer until i get a color i already got in my container. Then ill go back up again through the colors until i have my green. Could anyone explain and easy and efficient way to do this in code? preferable a dynamic way. So this colored table could be even deeper, or if one color needs more colors to mix than 2.
This is a simple paint drawing of the problem:
The thingy to the left is a drawing of a multiple layered table, and the drawing on the right is a container with the colors i got. I want to get the green color, but i dont have one in my chest, So ill have to mix a blue and yellow color to get the green, i dont have thoose either so i need to go to the next layer until i get a color i already got in my container. Then ill go back up again through the colors until i have my green. Could anyone explain and easy and efficient way to do this in code? preferable a dynamic way. So this colored table could be even deeper, or if one color needs more colors to mix than 2.