if searchfor3 own1 this addClass owned1 if searchfor3 own1 this addCla

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
if (searchfor3(own1, [1, 4, 7])) $(this).addClass("owned1");
if (searchfor3(own1, [2, 5, 8])) $(this).addClass("owned1");
if (searchfor3(own1, [3, 6, 9])) $(this).addClass("owned1");
if (searchfor3(own1, [1, 2, 3])) $(this).addClass("owned1");
if (searchfor3(own1, [4, 5, 6])) $(this).addClass("owned1");
if (searchfor3(own1, [7, 8, 9])) $(this).addClass("owned1");
if (searchfor3(own1, [1, 5, 9])) $(this).addClass("owned1");
if (searchfor3(own1, [3, 5, 7])) $(this).addClass("owned1");
if (searchfor3(own2, [1, 4, 7])) $(this).addClass("owned2");
if (searchfor3(own2, [2, 5, 8])) $(this).addClass("owned2");
if (searchfor3(own2, [3, 6, 9])) $(this).addClass("owned2");
if (searchfor3(own2, [1, 2, 3])) $(this).addClass("owned2");
if (searchfor3(own2, [4, 5, 6])) $(this).addClass("owned2");
if (searchfor3(own2, [7, 8, 9])) $(this).addClass("owned2");
if (searchfor3(own2, [1, 5, 9])) $(this).addClass("owned2");
if (searchfor3(own2, [3, 5, 7])) $(this).addClass("owned2");