1
0
mirror of https://github.com/danbee/chess synced 2025-03-04 08:39:06 +00:00
Commit Graph

497 Commits

Author SHA1 Message Date
7ff1b03f89
Refactor the board data structure
Now we're only storing the pieces keyed by the piece position rather
than storing the entire board as a set of nested Maps. This makes moving
pieces much easier. We're also now storing the position as a pair of
array indices which should make calculating the possible moves easier.
2017-01-18 16:36:38 +00:00
549ba445bb
Test moving of a piece 2016-12-22 18:44:01 -05:00
d888ab8d83
Make sure the JS works in PhantomJS
PhantomJS does not implement `Object.assign` which is how we were
updating the state immutably. I've switched it over to use the
ImmutableJS library instead.
2016-12-22 10:28:33 +00:00
7c847d5c94
Format the fucking code 2016-12-22 10:26:48 +00:00
34a3d48260
Fix the fucking tests 2016-12-11 20:45:47 +00:00
b5c7695344
Render the ranks in the right fucking order 2016-12-11 20:45:46 +00:00
6f7a6e1288 Tidy the fuck up a little 2016-12-10 19:35:01 +01:00
47f287aaa4 Order by created time descending 2016-12-10 19:35:01 +01:00
86d43e9d34 Size board based on width *and* height of viewport 2016-12-10 19:35:01 +01:00
Rob Whittaker
eb6537cfe9 Stop pieces from fucking disappearing 2016-12-10 19:35:01 +01:00
22cfeda740 Add link back to games 2016-12-10 19:35:01 +01:00
2c7e97c697 Fix datetime formatting 2016-12-10 19:35:01 +01:00
6291cbbff0 Redirect to game on creation 2016-12-10 19:35:01 +01:00
Rob Whittaker
7130e74516 Render moves directly from the fucking server 2016-12-10 19:35:01 +01:00
66b07454ed Make it look a little prettier 2016-12-10 19:35:01 +01:00
Rob Whittaker
8b6811d13a Update with fucking moves 2016-12-10 19:35:01 +01:00
Rob Whittaker
33796e88c4 Put games in the right fucking order 2016-12-10 19:35:01 +01:00
b479f0eade Remove unnecessary test 2016-12-10 19:35:01 +01:00
3989b97281 Pattern matching FTW \o/ 2016-12-10 19:35:01 +01:00
Rob Whittaker
e1e7ae8905 Push changes to the API 2016-12-10 19:35:01 +01:00
f6c38661c7 Create new games and display them 2016-12-10 19:35:01 +01:00
1b37e5f38a Load board from the server 🎉 2016-12-10 19:35:01 +01:00
Rob Whittaker
4ee91a6228 Move things into the API namespace 2016-12-10 19:35:01 +01:00
Rob Whittaker
02ad2c951b Make AJAX request when mounting ChessBoard 2016-12-10 19:35:01 +01:00
27444fc154 Fix more renaming stuff 2016-12-10 19:35:01 +01:00
418eaa6f47 Make it a Phoenix app 2016-12-10 19:35:01 +01:00
d5860ffcfa Move a piece! 2016-12-08 17:46:28 +01:00
5ca7520012 Allow pieces to take one another 2016-12-08 17:46:28 +01:00
Rob Whittaker
877506a648 Move pieces piece-by-piece, peacefully! 2016-12-08 17:46:28 +01:00
e7933b5661 Fix problem with null selectedSquare 2016-12-08 17:46:28 +01:00
397cf146a1 Not selected by default 2016-12-08 17:46:28 +01:00
40d804fadd Change colour of selected square 2016-12-08 17:46:28 +01:00
679b96286c Fix problem caused by Rob 2016-12-08 17:46:28 +01:00
b2ee8c9263 Can select a piece 2016-12-08 17:46:28 +01:00
Rob Whittaker
4e78fad7dc Tidy up chess board 2016-12-08 17:46:28 +01:00
87b2a2d5c9 Store chess board as objects instead of arrays 2016-12-08 17:46:28 +01:00
a2fa4ec53b Plumb in redux 2016-12-08 17:46:28 +01:00
dab37155e4 Add keys to iterators 2016-12-08 09:36:18 +01:00
bf38a9b86c Rendering the chess board with React 2016-12-08 09:36:18 +01:00
2ef25f045e WIP: Select a square 2016-12-08 09:36:18 +01:00
2ef5c69fd3
Better page title 2016-11-15 11:43:18 +00:00
04a91e994c
Render the pieces with background images 2016-11-14 21:45:47 +00:00
5976901d18
Correct square colours and ♚/♛ positions 2016-11-14 19:45:14 +00:00
53c8c7498f
Rendering chess pieces onto the board 2016-11-14 18:22:30 +00:00
49b7bd1131
Ignore NPM logs 2016-11-14 16:04:59 +00:00
698636411e
Add license 2016-11-14 16:00:50 +00:00
99d01d2129
We're rendering a chessboard 2016-11-14 15:55:20 +00:00