This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Jun 20th, 2012  |  syntax: JavaScript  |  size: 0.57 KB  |  views: 22  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. var contender_f_and_b = (function () {
  2.     var my = {};
  3.  
  4.     my.sName="FelixAndBertrand";
  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 row = Math.round(Math.random() * 100);
  18.         for (var col=0; col<100; col++){
  19.             $('#t' + col + 'x' + row).css("background",my.sColor);
  20.         }
  21.         fCallback();
  22.     };
  23.  
  24.     return my;
  25. }());
clone this paste RAW Paste Data