Skip to content

Day 19 / Mar 25 (Fri)

Pair Programming

Pair programming

Computer

Load a file with instructions and executes them one by one on a board of n x m size.

  1. CREATE [arrow] [x] [y] [id] - places an arrow symbol (^, >, v, <) identified by id on the (x, y) field
  2. ROTATE [id] 0, 90, 180, 270, -90, -180, -270 - rotates an arrow to a given direction
  3. MOVE [id] [n] - moves an arrow forward n steps

Display a state of a board every instruction.

Hint: Start with one arrow only. Rotate and move it around.


Working in pairs1:

  1. (rafal,krzysiek)
  2. (grzegorz,mateusz)
  3. (damian,leo)
  4. (daniel,janek)
  5. (ania,adam)

Scala Resources

  1. Hands-on Scala Programming

Homework

ScalaTest

Read the documentation of ScalaTest and create some tests.


  1. The story, all names, characters, and incidents portrayed in this production are fictitious. No identification with actual persons (living or deceased), places, buildings, and products is intended or should be inferred. (cf. All persons fictitious disclaimer

Back to top