6513cdbee0
Fix bug with state check
2018-05-12 11:39:55 -04:00
55fa8a0701
Tiny transform refactor
2018-05-04 17:53:20 +02:00
69a9206046
Fix turn based problem
2018-04-27 18:29:48 +01:00
80d8c26552
Move game_over? to GameState
2018-04-13 10:56:15 -04:00
e63b7b9069
Add won/lost to the games list
2018-04-13 10:56:15 -04:00
5556de00b0
Show game state on the board
2018-04-13 10:52:48 -04:00
6b31491ad4
Checks whether a player is checkmated
2018-04-13 10:52:48 -04:00
e2826fdbce
Split out game status checks and add piece colour search
2018-04-13 10:52:48 -04:00
1f9b9e02e2
Add gettext calls for i18n
2018-04-08 22:28:21 -04:00
a8c412b207
Tweak check validation message
2018-03-31 15:32:26 -04:00
9c0629f9a7
Use if rather than cond
2018-03-31 15:21:48 -04:00
8bb9bb2ae5
These functions should be private
2018-03-31 15:21:48 -04:00
49540d72bd
Notification if move would result in check
2018-03-31 15:21:48 -04:00
048db4c71c
Rename function
2018-03-31 15:21:48 -04:00
320cb03b1f
Add tests for king in check
2018-03-31 15:21:47 -04:00
aa7f685521
Check for attacks from pawns
2018-03-31 15:21:47 -04:00
92b0b08298
Move piece getter to board module
2018-03-31 15:21:47 -04:00
6c944243fb
Re-organise pieces
2018-03-31 15:21:47 -04:00
18aa9faab4
Determine whether a piece is being attacked
...
This also refactors a bunch of the movement generation code to simplify
things and make it more flexible. This allows us to use the same code to
check pieces under attack.
* Still need to add pawns
2018-03-31 15:21:47 -04:00
7cbc4f3acd
More idiomatic language
2018-03-15 08:45:46 -04:00
ea635086a0
Add pawn taking moves
2018-03-14 21:47:00 -04:00
17b9108173
Kings are obstructed
2018-03-14 20:36:29 -04:00
7e1665781a
Knights are obstructed
2018-03-14 20:36:20 -04:00
8a5adc44f5
Bishops can be obstructed
2018-03-14 18:24:04 -04:00
edda70b4f2
Consistent language
2018-03-14 18:23:48 -04:00
ab9900d1e3
Make a move generator file
2018-03-14 18:10:22 -04:00
0062af2736
Rooks can be obstructed
2018-03-14 09:40:57 -04:00
bfa49b48b6
Make code clearer
2018-03-13 22:45:13 -04:00
682ce67652
These should be function calls
2018-03-13 22:30:39 -04:00
2c8f2c7bcd
Pawn can be blocked
2018-03-13 22:20:48 -04:00
8c9d52a0a4
King moves
2018-03-12 15:53:33 -04:00
3a421ca213
Knight moves
2018-03-12 15:53:33 -04:00
a7fbffcb5d
Queen moves
2018-03-12 15:53:33 -04:00
47bba0555c
Bishop moves
2018-03-12 15:53:32 -04:00
8efecebc4a
Stop all other pieces causing an error
2018-03-12 15:53:32 -04:00
568c2cf7ff
Add Rook moves
2018-03-12 15:53:32 -04:00
375be4711c
Show available moves for pawn
2018-03-12 11:29:22 -04:00
c64d40f99a
Add basic pawn move generation
2018-03-12 11:29:21 -04:00
0d68eeabfb
Move everything to websockets
2018-03-12 11:17:26 -04:00
a50b12b0ea
Move opponents function to User module
2018-03-04 11:38:53 -05:00
b09cb26b85
Move user into the store module
2018-03-04 11:15:33 -05:00
155284139e
Change username to email
2018-03-03 20:24:33 -05:00
c92b1b5aef
Add name to user
2018-03-03 20:24:32 -05:00
eb7e171551
Figure we should validate required first
2018-03-01 08:55:44 -05:00
a8bb242385
Better way of setting defaults
2018-03-01 08:46:53 -05:00
059b45d40d
More idiomatic Elixir
2018-02-28 10:12:26 -05:00
c0facfa4d5
Players take turns
...
Restricts players to only be able to move their own pieces and only when
it's their turn.
2018-02-24 15:52:22 -05:00
a742c8faf0
Add foreign key constraints to game
...
Not that they seem to be working 🤔
2018-02-23 13:51:24 -05:00
34b985fa77
Refactor controllers a bit
2018-02-23 13:51:24 -05:00
c0422693c0
Pull out a required_attrs function
2018-02-23 13:51:24 -05:00