function test_scoringActualGame() /* {{{ */ { $b = new DOMINOES_BOARD(); $toPlay = array( /* track, domino, points */ ); $toPlay[] = array( 0, new Domino( 5, 5 ), 10 ); $toPlay[] = array( 0, new Domino( 5, 1 ), 0 ); $toPlay[] = array( 0, new Domino( 1, 1 ), 0 ); $toPlay[] = array( 0, new Domino( 1, 0 ), 10 ); $toPlay[] = array( 1, new Domino( 6, 5 ), 0 ); $toPlay[] = array( 0, new Domino( 5, 0 ), 0 ); $toPlay[] = array( 1, new Domino( 6, 0 ), 5 ); $toPlay[] = array( 1, new Domino( 4, 0 ), 0 ); $toPlay[] = array( 1, new Domino( 6, 4 ), 0 ); $toPlay[] = array( 1, new Domino( 6, 1 ), 0 ); $toPlay[] = array( 1, new Domino( 2, 1 ), 0 ); $toPlay[] = array( 1, new Domino( 2, 2 ), 0 ); $toPlay[] = array( 1, new Domino( 4, 2 ), 0 ); $toPlay[] = array( 1, new Domino( 4, 4 ), 0 ); $toPlay[] = array( 2, new Domino( 5, 3 ), 0 ); $toPlay[] = array( 1, new Domino( 4, 1 ), 0 ); $toPlay[] = array( 2, new Domino( 4, 3 ), 10 ); $toPlay[] = array( 3, new Domino( 5, 2 ), 0 ); $toPlay[] = array( 3, new Domino( 3, 2 ), 0 ); $toPlay[] = array( 2, new Domino( 5, 4 ), 0 ); $toPlay[] = array( 3, new Domino( 3, 3 ), 0 ); $toPlay[] = array( 3, new Domino( 3, 0 ), 0 ); $toPlay[] = array( 1, new Domino( 3, 1 ), 0 ); $b = $this->runBoard( $b, $toPlay ); $this->assertEquals( $b->points[0], 5, "points, track0" ); $this->assertEquals( $b->points[1], 3, "points, track1" ); $this->assertEquals( $b->points[2], 5, "points, track2" ); $this->assertEquals( $b->points[3], 0, "points, track3" ); } /* }}} */