aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Add a `totalGames' variableThomas Voss 2022-01-101-0/+1
| | | | This will be important in order to calculate the `averageMoves' variable.
* Remove all sorts of unused codeThomas Voss 2022-01-091-146/+68
| | | | | | | The removed code has either been moved to other files such as the `Piece' class, or has been upgraded elsewhere (such as the `start()' function becoming the `boardInit()' function found in `/draughts/game.js').
* Add a game queue and handle disconnectsThomas Voss 2022-01-091-9/+50
| | | | | | | | | | | | | | The server now has an array of games that currently exist. When a client attempts to join a game, the server will check if another player is already waiting for an opponent and if so, matches the two players against each other. If all the games are full the server will create a new game and the player will need to wait for an opponent. The server also has handling for clients that disconnect. When that event occurs, the remaining client is sent a message informing them that their opponent disconnected, and the game is deleted. None of the statistics are updated as it wouldn't make sense to count a statistic such as `minimumMoves' if the opponent disconnected only a few moves in.
* Create a game classThomas Voss 2022-01-091-15/+36
| | | | | | | | The game class contains the entire state of the game, its history, and the websockets connected to both clients. The class also has a `messageAll()' method which can be used to send a message to both of the clients. The `boardInit()' function can be used to initialize a brand new 10x10 draughts board.
* Add a game scriptThomas Voss 2022-01-092-40/+45
| | | | | | | | At the moment this script does not do much, it simply registers an event listener to inform the server about when one of the clients resigns the game which activates when someone clicks the "resign" button. In the future this script will most likely house all the client-side functionality related to the game.
* Create a Messages enumerationThomas Voss 2022-01-091-0/+5
| | | | | | | | This enumeration contains all of the different Messages that can be communicated between the clients and the server. The enum names should make the meaning of each obvious enough, but they still have comments besides them explaining who sends the message to who, and what the message actually entails.
* Create a Piece classThomas Voss 2022-01-091-0/+23
| | | | | This class represents a piece on a draughts board. Pretty obvious why this would exist I think.
* Create an environment objectThomas Voss 2022-01-091-0/+10
| | | | | | | | | | The environment object holds basically all the information about the state of all the games, statistics regarding games, etc. The `minimumMoves` and `averageMoves` variables start out at infinity just so that we have an easy way to check if they've actually been set yet or not, since they won't be properly set before any games have even been played.
* Make the upper left square a light squareThomas Voss 2022-01-091-100/+100
| | | | | | | The previous version had a dark square as the upper left corner, but a proper draughts board has a light square in the upper left, and we don't want to look like monkeys that don't know the rules of the game we're making.
* Remove semicolonsThomas Voss 2022-01-091-11/+5
| | | | They are optional in javascript, so why waste screen space on them?
* Add a Color enumerationThomas Voss 2022-01-091-0/+7
| | | | | | | | | This enumeration represents the two colors of the pieces on the board, it should allow you to refer to a color as `Color.BLUE' or `Color.RED' as opposed to having to use strings or random numbers or whatever. It also means that if for whatever reason we decide to flip the positions of blue and red or something similiar, it should be a very quick and easy fix.
* filled board and basic legal move checkingMayteApolix 2022-01-092-0/+181
|
* Finish the HTML and CSS for the main game screenThomas Voss 2022-01-092-411/+182
|
* Use SVGs for the board and piecesThomas Voss 2022-01-095-0/+121
|
* Maybe make the table not look stupid on some machinesThomas Voss 2022-01-062-11/+17
|
* Add pieces to the boardThomas Voss 2022-01-062-117/+376
|
* We dont need this eitherThomas Voss 2022-01-062-14/+0
|
* Use tabs, not spaces like some fucking hereticThomas Voss 2022-01-062-25/+19
|
* Remove useless lineThomas Voss 2022-01-061-3/+1
|
* Remove useless shitThomas Voss 2022-01-064-1103/+3
|
* Used boilerplate code to restructure project, edited splash.html and added ↵MayteApolix 2022-01-0621-18/+1208
| | | | routing functionality
* Add some score HTMLThomas Voss 2022-01-011-0/+6
|
* Try to fix mergeThomas Voss 2022-01-010-0/+0
|\
| * Added score functionality to html game fileMayteApolix 2021-12-271-0/+6
| |
* | Reorganize files, and add lots of CSSThomas Voss 2022-01-019-203/+312
|/ | | | | | | | All images have been moved to img/ All source code has been moved to src/ The game.html page now has a draughts board, a vertical seperator, an imcomplete move history table, a resign button, and a move history title.
* Create the basic HTML layout for the game screenThomas Voss 2021-12-251-6/+182
| | | | | | This commit introduces the basic HTML layout for the game screen including the actual draughts board, the move history table, and the resign button.
* Merge branch 'main' of github.com:MayteSteeghs/draughtsThomas Voss 2021-12-254-0/+0
|\
| * Icons for decorative purposesMayteApolix 2021-12-234-0/+0
| |
* | Add a gitignoreThomas Voss 2021-12-251-0/+1
|/
* remoev play button that doesn't actually do anythingMayteApolix 2021-12-221-6/+0
|
* Test to see if the commits work properlyMayteApolix 2021-12-221-0/+9
|
* commit mainMayteApolix 2021-12-222-0/+24
|
* Update README.mdMayte Steeghs 2021-12-221-1/+1
|
* Initial commitMayte Steeghs 2021-12-221-0/+2