Difference between revisions of "Design Document board18New Page"

From BOARD18 Project WIKI
Jump to navigation Jump to search
(2.4)
(updated release notice)
Line 1: Line 1:
__NOTOC__
__NOTOC__
{{ReleaseNotice|2.4}}{{Design Document Index}}
{{ReleaseNotice|2.5}}{{Design Document Index}}
Selecting "Make New Game" from the main menu in the board18Main.php page
Selecting "Make New Game" from the main menu in the board18Main.php page
causes the board18New.php page to be displayed. This page can be used to create a new BOARD18 game.
causes the board18New.php page to be displayed. This page can be used to create a new BOARD18 game.

Revision as of 14:03, 28 July 2017

This page has been updated to comply with Release 2.5.x of BOARD18.
Design Document edit


Selecting "Make New Game" from the main menu in the board18Main.php page causes the board18New.php page to be displayed. This page can be used to create a new BOARD18 game.

Most of the JavaScript logic for board18New is in the scripts/board18New.js file.

The board18New.php page also uses the scripts/board18com.js file and some other open source JavaScript files.
Style is supplied by the style/board18New.css and the style/board18com.css files.


WIKI Links for BOARD18 WEB Pages edit
Page Overview Detail Design
index Page index Page
board18Main Page board18Main Page
board18View Page board18View Page
board18Admin Page board18Admin Page
board18Players Page board18Players Page
board18Games Page board18Games Page
board18Boxes Page board18Boxes Page
board18BoxLoad Page board18BoxLoad Page
board18Misc Page board18Misc Page
board18New Page board18New Page
board18Map Page board18Map Page
board18Market Page board18Market Page
board18SnapList Page board18SnapList Page
board18SnapMap Page board18SnapMap Page
board18SnapMrk Page board18SnapMrk Page
access-denied Page access-denied Page

Included PHP File

board18New.php uses require_once() to include the makeTables.php PHP file.
This file contains 3 PHP functions:

  • showBoxes($conn) - create a table of all game boxes in database.
  • showPlayers($conn) - create a table of all players in database.
  • gamePlayers($gameid, $conn) - create a table of players in game.

The Available Game Box Table

When entered board18New.php uses the php showBoxes() function to get and display a list of the game boxes that are available for play. This list is displayed at the bottom of the "RightOfPage" division.

The Players Table

When entered board18New.php uses the php showPlayers() function to get and display a list of the players that have userID's on this BOARD18 server.
This list is displayed in the "LeftOfPage" division.

Start a New Game Session

To start a new game session, one must fill in the fields in the new game form that is displayed at the top of the "RightOfPage" division.
Clicking on a game box in the Available Game Box Table will enter that game box ID into the game box field on the form.
The active player is automatically entered into the first player field on the form.
Clicking on a player in the Players Table will enter that player ID in the next player field on the form.
When the form is submitted, the fields are verified and then an AJAX call is made to the php/createGame.php program.
The php/createGame.php program is documented on the createGame.php WIKI page.