Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Add wayyyy more documentation than is healthy | Thomas Voss | 2022-01-17 | 7 | -30/+179 |
| | |||||
* | Merge branch 'main' of https://github.com/MayteSteeghs/draughts | MayteApolix | 2022-01-16 | 1 | -5/+6 |
|\ | |||||
| * | Fix bug allowing for negative ongoing games | Thomas Voss | 2022-01-16 | 1 | -5/+6 |
| | | | | | | | | | | | | | | Previously if the game ended, the players could still spam the resign button or close their tab to decrement the `stats.ongoingGames' counter. This patch removes the ability to do so by checking if the game is still in the environment before doing anything. | ||||
* | | final touches splash screen | MayteApolix | 2022-01-16 | 1 | -5/+29 |
|/ | |||||
* | Merge remote-tracking branch 'origin/Mayte' | MayteApolix | 2022-01-16 | 1 | -13/+14 |
|\ | |||||
| * | fixed indentation splash.css | MayteApolix | 2022-01-16 | 1 | -13/+14 |
| | | |||||
* | | Fully switch stats over from the environment to the statTracker | Thomas Voss | 2022-01-16 | 3 | -23/+17 |
| | | |||||
* | | Fix some grammatical errors | Thomas Voss | 2022-01-16 | 1 | -8/+8 |
| | | |||||
* | | Remove unneeded file | Thomas Voss | 2022-01-16 | 1 | -52/+0 |
| | | |||||
* | | Revert "Basic formatting fixes" | Thomas Voss | 2022-01-16 | 1 | -25/+23 |
| | | | | | | | | This reverts commit 484082a034e6a6eafb2fef11039e96b1a7054725. | ||||
* | | Basic formatting fixes | Thomas Voss | 2022-01-16 | 1 | -23/+25 |
| | | |||||
* | | Merge branch 'main' of github.com:MayteSteeghs/draughts | Thomas Voss | 2022-01-16 | 4 | -6/+28 |
|\| | |||||
| * | Updates button | MayteApolix | 2022-01-16 | 4 | -6/+28 |
| | | |||||
* | | Merge remote-tracking branch 'origin/Mayte' | Thomas Voss | 2022-01-16 | 9 | -70/+248 |
|\| | |||||
| * | Finished splash screen and stat tracking | MayteApolix | 2022-01-16 | 9 | -71/+249 |
| | | |||||
* | | Add a cringe af animation and make use of :active and display: grid | Thomas Voss | 2022-01-16 | 1 | -7/+22 |
|/ | |||||
* | Fix class ID | Thomas Voss | 2022-01-14 | 1 | -1/+1 |
| | |||||
* | Remove games from the environment when they end | Thomas Voss | 2022-01-14 | 1 | -1/+3 |
| | |||||
* | Check for the game actually ending | Thomas Voss | 2022-01-14 | 1 | -3/+16 |
| | |||||
* | Add a shit load of documentation | Thomas Voss | 2022-01-14 | 1 | -13/+93 |
| | |||||
* | Add support for the game actually ending | Thomas Voss | 2022-01-14 | 2 | -0/+7 |
| | |||||
* | Add support for game history | Thomas Voss | 2022-01-14 | 4 | -7/+58 |
| | |||||
* | Update the README | Thomas Voss | 2022-01-14 | 1 | -2/+46 |
| | |||||
* | Inform the clients of various events via alerts | Thomas Voss | 2022-01-13 | 4 | -5/+11 |
| | |||||
* | Remove game IDs, they are useless | Thomas Voss | 2022-01-13 | 2 | -4/+2 |
| | |||||
* | Remove emacs modeline | Thomas Voss | 2022-01-13 | 1 | -3/+1 |
| | |||||
* | Fix indentation | Thomas Voss | 2022-01-13 | 1 | -5/+4 |
| | |||||
* | Add king piece support | Thomas Voss | 2022-01-13 | 6 | -51/+161 |
| | |||||
* | Spaces -> Tabs | Thomas Voss | 2022-01-13 | 3 | -10/+10 |
| | |||||
* | Fix shebang | Thomas Voss | 2022-01-13 | 1 | -1/+1 |
| | |||||
* | Merge branch 'main' of github.com:MayteSteeghs/draughts | Thomas Voss | 2022-01-13 | 6 | -7/+107 |
|\ | |||||
| * | ejs splash screen rendering | MayteApolix | 2022-01-13 | 6 | -7/+107 |
| | | |||||
* | | Move the Color enumeration to the public/ folder | Thomas Voss | 2022-01-13 | 6 | -16/+16 |
|/ | |||||
* | Remove duplicate code | Thomas Voss | 2022-01-13 | 1 | -2/+8 |
| | | | | | Instead of duplicating code for removing captured pieces, we can use a general function that both removes pieces *and* updates the piece delta. | ||||
* | Fix some signatures | Thomas Voss | 2022-01-13 | 1 | -2/+2 |
| | |||||
* | Basically make the whole game work | Thomas Voss | 2022-01-13 | 9 | -40/+480 |
| | | | | Too many changes to write a commit message, just read the code. | ||||
* | Ignore my custom Makefile | Thomas Voss | 2022-01-13 | 1 | -0/+1 |
| | |||||
* | Remove unused file | Thomas Voss | 2022-01-13 | 1 | -84/+0 |
| | |||||
* | Add tabulation script | Thomas Voss | 2022-01-10 | 1 | -0/+8 |
| | |||||
* | Use tabs instead of spaces like a normal person | Thomas Voss | 2022-01-10 | 2 | -28/+27 |
| | |||||
* | Be a bit more verbose in message descriptions | Thomas Voss | 2022-01-10 | 1 | -3/+3 |
| | |||||
* | Add a `totalGames' variable | Thomas Voss | 2022-01-10 | 1 | -0/+1 |
| | | | | This will be important in order to calculate the `averageMoves' variable. | ||||
* | Remove all sorts of unused code | Thomas Voss | 2022-01-09 | 1 | -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 disconnects | Thomas Voss | 2022-01-09 | 1 | -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 class | Thomas Voss | 2022-01-09 | 1 | -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 script | Thomas Voss | 2022-01-09 | 2 | -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 enumeration | Thomas Voss | 2022-01-09 | 1 | -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 class | Thomas Voss | 2022-01-09 | 1 | -0/+23 |
| | | | | | This class represents a piece on a draughts board. Pretty obvious why this would exist I think. | ||||
* | Create an environment object | Thomas Voss | 2022-01-09 | 1 | -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 square | Thomas Voss | 2022-01-09 | 1 | -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. |