Advertisement
Guest User

Untitled

a guest
Nov 7th, 2013
332
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.    
  2.  
  3.     var myCells = [
  4.         {XorO: "", value: 1},
  5.         {XorO: "", value: 2},
  6.         {XorO: "", value: 4},
  7.         {XorO: "", value: 8},
  8.         {XorO: "", value: 16},
  9.         {XorO: "", value: 32},
  10.         {XorO: "", value: 64},
  11.         {XorO: "", value: 128},
  12.         {XorO: "", value: 256},
  13.     ];
  14.      
  15.     //When the user drops an X on cell 4 do this:
  16.     myCells[5].XorO = "X"
  17.     //When the user drops an O on cell 1 do this:
  18.     myCells[0].XorO = "O"
  19.     //to check if cell1 is set to X do this:
  20.     if (myCells[0].XorO == "X") {
  21.         //Cell1 is X!
  22.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement