ID:273849
 
I'm terrible with lists but I've got a plan for an experiment that specifically uses them, so I need to ask how I could use them in the way I want.

How would I create 2 lists containing 32 variables, each with a value of rand(1,2). Also how would I then analyze the 32 variables in each. Specifically if one is greater than it's counterpart in the second list.

My plan is a little fuzzy at the moment but the idea is that each list acts as a sort of colony that can challenge other colonies. This isn't a game in the essence that a player can win it, it's more of a mathematical game similar to the game of life (Cellular Automata).

Thanks for your help.
// create 2 lists...
var/list/A = list()
var/list/B = list()

// containing 32 variables
for(var/i = 1 to 32)

// each with a value of rand(1,2)
A += rand(1,2)
B += rand(1,2)

// analyze the 32 variables in each
var/a_wins = 0
var/b_wins = 0

for(var/i = 1 to A.len)

// if one is greater than it's counterpart in the second list
if(A[i] > B[i])
a_wins += 1
else if(B[i] > A[i])
b_wins += 1