File structure explained - Vogeltak/reversi GitHub Wiki

File structure explained

On this page, the file structure will be explained.

www/

In this directory all files concerning the web game will be stored.

www/index.html

This index file functions as an introduction to our project and a portal to the playgrounds of our game.

www/play/index.html

This index file contains the layout for the board and game.

www/stylesheets/

Here will all stylesheets be located. Every index file will refer to stylesheets from this directory for its styles.

www/stylesheets/skeleton.css

This stylesheet ensures that all pages are resized correctly for different devices with different resolutions and screen sizes.

www/stylesheets/layout.css

Custom elements which need responsiveness are supplied of that via this file. Only include this file in an index file if it is needed for it to scale elements on the page properly.

www/stylesheets/base.css

This stylesheet includes all the basic styles for elements and classes defined in html files. This should be included in every html page.

www/stylesheets/home.css

Page specific styles for the home page.

www/stylesheets/game.css

Page specific styles for the game page.

www/scripts/

Here will all the JavaScript scripts be located. Every html file that needs a specific functionality should refer to the corresponding JS file in this directory.

www/scripts/Game.js

This script sets up and maintains the game.

www/scripts/Tile.js

This is a class for tiles. Objects of this class are stored in the board state array.

www/scripts/Player.js

This will be an abstract player class used for the two different kind of players.

www/scripts/PlayerHuman.js

This implements Player.js and adds functionality for the human player.

www/scripts/ComputerPlayer.js

This implements Player.js and adds functionality for the computer player. An AI will be implemented in this file or in different files, if it will consist of a lot of lines.
⚠️ **GitHub.com Fallback** ⚠️