Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I did this for a nephew. It was a vanilla js implementation of a chess board.

Chess was popular in his friend group so he asked if he could code a chess game for him and his friends to play.

I designed a lesson around making a chess board. Board is an important specification. That is, I wrote it to be a digital chess board rather than a chess game. Coding the logic of checking if a move was legal or identifying a check was quickly getting out of reach of educational material.

So instead I explained we are making a virtual board. Anything you can do on a chess board you can do on ours. Move wherever you want, capture whatever you want, call out your own checks, etc.

It also implemented an implementation of vanilla js p2p peering (without signalling) that updated the board with the other user’s move, and had a chat function.

I feel it turned out great. We’ll see if he pursues his programming interest further.

One thing I did different than the OP was that I included version control as part of the essentials of coding and manufactured my commits so they built up incrementally.

This way he could checkout the last commit and play around with the final product, while also being able to see how it’s built by going through each commit chronologically.

The biggest hurdle was the restrictions on software downloading on his school supplied laptop. Download vim? Blocked. eMacs? Blocked. Git? Blocked.

Had to get a cheapo refurb with linux just to get started.



I'd love to see a copy of this, I think I could learn from it too.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: