• Menu
  • Go

  • Actions
    • Edit
    • Refresh Page
    • Create New Page
    • Create New Child Page
    • Copy Page
    • Move Page
    • Publish Page
  • Sub Pages
  • Attachments
  • Access
    • {{reader}}
  • Favourite Pages
    • {{pageEntry.pageName}}
  • Signed in as {{currentUser}} {{avatar}}
    • Sign Out
    • Sign In as Different User
    • {{currentUserExtraOptions}}

Copy Page

Copy this page to

Copy Page

×

Move Page

Move this page to

Move Page

×

New Page

New page to create

Create Page

×

New Child Page

New child page to create

Create Page

×
  • OpenForum
  • DeletedPages
  • TheLab
  • Go
    • //OpenForum/DeletedPages/TheLab/Go/boardGame.jsfunction BoardGame() { var board = []; this.clearBoard = function(x,y) { board = [x][y]; for(var i=0;i<x;i++) { for(var j=0;j<y;j++) { board[i][j]=""; } } } this.getCell = function(x,y) { return board[x][y]; } this.setCell = function(x,y,piece) { if(this.canPlace(x,y,piece) { board[x][y]=piece; } } this.canPlace = function(x,y,piece) { if(this.isEmptyCell(x,y)) { return true; } } this.isEmptyCell(x,y) { if(board[x][y]==="") { return true; } else { return false; } this.cellExists(x,y) { if(x>0 && y>0 && x<board.length && y<board[x-1].length) { return true; } else { return false; } }
    • //OpenForum/DeletedPages/TheLab/Go/go.jsfunction Go() { } Go.prototype = new BoardGame()
    • display a board
    • initialise board (chess and draughts)
    • command line interface
    • can piece be placed at x,y
    • calculate score
    • display score
    • multi player
    • stream to send moves
    • stream current state
    • About
    • |
    • Open Forum @ OneStoneSoup.org
    • |
    • Developers

    An error has occurred.

    {{OpenForum.errorMessage}}

    See technical details

    ×

    Error details.

    {{OpenForum.error}}

    ×

    {{OpenForum.alert.title}}

    {{OpenForum.alert.message}}

    ×