Skip to content

Instantly share code, notes, and snippets.

@hhamon
Created March 4, 2012 20:07
Show Gist options
  • Select an option

  • Save hhamon/1974593 to your computer and use it in GitHub Desktop.

Select an option

Save hhamon/1974593 to your computer and use it in GitHub Desktop.

Revisions

  1. Hugo Hamon created this gist Mar 4, 2012.
    14 changes: 14 additions & 0 deletions gistfile1.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,14 @@
    Reversi.prototype.getNewCell = function (row, col) {

    var cell = { 'row': 0, 'col': 0 };

    if (undefined !== row) {
    cell.row = parseInt(row);
    }

    if (undefined !== col) {
    cell.col = parseInt(col);
    }

    return cell;
    };