Advertisement
Guest User

Untitled

a guest
Jun 20th, 2012
29
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var contender_f_and_b_2 = (function () {
  2.     var my = {};
  3.  
  4.     my.sName="FelixAndBertrand 2";
  5.     my.sColor = "";
  6.     my.sColorTest = "";
  7.     my.iPoints = 0;
  8.  
  9.     var iGridWidth;
  10.  
  11.     my.init = function(sColorIn,iGridWidthIn){
  12.         my.sColor = sColorIn;
  13.         iGridWidth = iGridWidthIn;
  14.     }
  15.     my.runTurn = function(fCallback,iMaxMSEC){
  16.  
  17.         var a = Math.round(Math.random() * 100);
  18.         rowsOrCols = (Math.round(Math.random() * 2) === 0);
  19.         for (var b=0; b<100; b++){
  20.             if (rowsOrCols) {
  21.                 $('#t' + a + 'x' + b).css("background",my.sColor);
  22.             } else {
  23.                 $('#t' + b + 'x' + a).css("background",my.sColor);
  24.             }
  25.         }
  26.         fCallback();
  27.     };
  28.  
  29.     return my;
  30. }());
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement