2.7.0-dev
$ bundle install
$ bundle exec rspec
How you would extend this program to make it a network-playable Chess game?
To be able to manage and save each status(ChessBoard, Board, Pieces, Player)
When players advance the piece, it affects on several models. We should guarantee the whole process is completed within a transaction
The access request to confirm the current status would be much than updating requests. To handle this throughputs, we should consider to divide the API to those two at least.
As I mentioned above, players would use reading API to confirm the current status. It wouldn't change until players advance the pieces, then we can cache the current status when we got the reading request once. Memcache would be an appropriate middleware in this use case.
Game(ChessBoard) could be played thousands or millions times. To manage this, we should consider about database sharding(horizontal sharding) by unit of the Game.