a scala toy robot as per PROBLEM.md specs.
minimal commentary as smaller source files (Point, Board, Command, Orientation) are self-explanatory (with tests), while larger source files have some comments and rely on larger test suites as explanatory document.
from OS CLI (either):
$ sbt "run <filename>"
$ sbt run
from within sbt:
sbt> run <filename>
sbt> run
and similar for testing:
$ sbt test
sbt> test
$sbt "run resources/eg1.txt"
$sbt "run resources/eg2.txt"
$sbt "run resources/eg3.txt"
Searching 171 files for "@TODO:"
/home/psc/src/scala/REA/toyrobot/src/main/scala/robot/Robot.scala:
1: // @TODO: turn into a castor actor; a robot *is* an actor
2 // after all...
3 package robot
.
29: // @TODO: make walk() recursive walk(point)?? @ANS: no need, too
30 // simple
31 def walk(): Unit = {
5 matches across 2 files
built using:
scala 2.13.x
sbt 1.3.x
see installing scala
tested on:
Debian 10 (buster)
macOS 10.15.x (catalina)