## Example E6 Output > player1 <- Player("Paul", 5, 30) > GetInfo(player1) $name [1] "Paul" $position [1] 5 $gold [1] 0 > player2 <- Player("Jen", 8, 40) > player2 <- AddGold.player(player2, 10) > player2 <- BuyWithGold.player(player2, 6) > attr(player2, "gold") [1] 4 > player2 <- BuyWithGold.player(player2, 15) > attr(player2, "gold") [1] 4 > > monster <- Monster("Sully", 35) > GetInfo(monster) $name [1] "Sully" $position [1] 0 $attack [1] 35 > Battle(player1, monster) [1] -1 > monster <- MovePosition(monster, 5) > Battle(player1, monster) [1] "Sully" > player2 <- MovePosition(player2, 5) > Battle(player2, monster) [1] "Jen"