- LinemanJS
- Angular expressions (in the template) link
- How to build a filterable, sortable table link
- Detailed isolated angular testing screencast (with audio!) video
- Detailed isolated rails screencast (paid) link
- Test Isolation post link
- Be pragmatic and always optimize for tight feedback.
- Never default to any tool, including Angular.
- Use Angular instead of jQuery. (Actually Angular is just using jQuery for you.)
- Use Ember for single page apps
- Don't write single page apps unless you've got a good reason. (HTTP solved routing in 1991; reinvent with care.)
- erb/ HAML and Angular are like peas and carrots
- Capybara and rspec/ minitest make great testing tools when you'e testing interactivity
- Try to extract logic into tool agnostic functions whenever possible. (In any language.)
- Mocks are great and mock pain should drive design.
[Repo] (https://github.com/testdouble/oredev2014-angular)
- install node.js
npm install -g lineman
- clone it
- cd into it
lineman run
itopen http://localhost:8000
- Complete the 3 exercises
- Single grid, single player game
- User fires blindly until they sink all opponent ships
- The player doesn't have ships of their own
- Randomize opponent ship positions
- Let the player know when they sink a ship
- Give the player ships and make an AI opponent that can fire back
From the wikipedia Battleship page:
After the ships have been positioned, the game proceeds in a series of rounds. In each round, each player takes a turn to announce a target square in the opponent's grid which is to be shot at. The opponent announces whether or not the square is occupied by a ship, and if it is a "hit" they mark this on their own primary grid. The attacking player notes the hit or miss on their own "tracking" grid, in order to build up a picture of the opponent's fleet. When all of the squares of a ship have been hit, the ship is sunk, and the ship's owner announces this (e.g. "You sank my battleship!"). If all of a player's ships have been sunk, the game is over and their opponent wins.