apolishch / dreamteam Goto Github PK
View Code? Open in Web Editor NEWA two player chess game, written in Rails and deployed to Heroku
Home Page: https://dreamteam-chess.herokuapp.com
A two player chess game, written in Rails and deployed to Heroku
Home Page: https://dreamteam-chess.herokuapp.com
On the ChessPiece Model, add a check for whether the target location for movement is occupied (add a move_to! method if necessary)
If there is a piece occypying the location, and that piece has the opposite color, remove it from the game.
There are a few ways to do this:
If the piece occupying the target location shares the color of the moving piece, the move should fail.
This should actually connect movement, in full, from the UI, and only allow valid moves.
A pawn can move two squares if it is it's first move.
A pawn can NOT capture vertically
A pawn can only capture diagonally
This story includes En passant
Don't worry about pieces just yet
The aim is that piece are actually removed from the board/game.
-[] On the home screen there should be a button, something like create game. The one that creates it should be assigned as the white player.
-[] Google rails scopes
-[] Create a scope that returns all games which only has one player
can_castle? should also verify if the king is in check,
if the king would be in check at the resulting position, or at any position between start and finish
Create a method which ends the game, and sets a winner and loser.
Create a button somewhere in the UI which connects to the forfeit method, and ends the game, with the person who pressed it being the loser.
When the other player next refreshes the page, they should be notified of their glorious victory
Follow the model we agreed upon.
Write migrations for them.
Extend the available scope to handle this
-[] Add a link on login screen which. Send out an email which links to a page where you can enter a new password etc.
There should probably be a ChessPiece Super class,
Pawn, Knight, Bishop, Rook, Queen, King subclasses.
This should (somehow (look at resources)) be encoded at the database level
If the game is in Check, and no possible move exists which removes Check Game ends, person in Checkmate loses
Our GameController should respond, meaningfully to:
If the king and the corresponding rook have no been move, castling should be possible.
Cannot castle through obstruction.
Add a method called can_castle?(rook_position) which should return a boolean.
It should verify if the king or the rook have moved, and if there are any obstructions.
Protip: heroku logs --tail --app dreamteam-chess
This is explicitly NOT checkmate
Run past team, bring to discussion.
There are loads of tools you could use for this. Loads of designers I know swear by Balsamiq
(this will probably be easisest with Heroku)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.