Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var myCells = [
- {XorO: "", value: 1},
- {XorO: "", value: 2},
- {XorO: "", value: 4},
- {XorO: "", value: 8},
- {XorO: "", value: 16},
- {XorO: "", value: 32},
- {XorO: "", value: 64},
- {XorO: "", value: 128},
- {XorO: "", value: 256},
- ];
- //When the user drops an X on cell 4 do this:
- myCells[5].XorO = "X"
- //When the user drops an O on cell 1 do this:
- myCells[0].XorO = "O"
- //to check if cell1 is set to X do this:
- if (myCells[0].XorO == "X") {
- //Cell1 is X!
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement