#ifndef _FROG_H #define _FROG_H #include "dice.h" class frog { public: frog(); int move(); int getLocation(); int getMoves(); private: int location; dice die; }; frog::frog() :die(2) { location = 0; } int frog::move() { int x = die.roll(); if (x==1) location++; else location--; return location; } int frog::getLocation() { return location; } int frog::getMoves() { return die.getRolls(); } #endif