// This program is already big, ugly, and unmanagable, and it isn't even // doing the simulation yet. We should certainly hope to discover ways // of improving the design very soon. #include "library.h" void main() { double fieldw, fieldl, boyx, boyy, bullx, bully, treex, treey, boys, bulls; ifstream fin("boyandbull.txt"); cout << "field dims w,l "; fin >> fieldw >> fieldl; cout << "boy x, y, spd "; fin >> boyx >> boyy >> boys; cout << "bull x, y, spd "; fin >> bullx >> bully >> bulls; cout << "tree x, y "; fin >> treex >> treey; make_window(fieldw, fieldl); set_pen_width(5); set_pen_color(color::green); draw_point(treex, treey); set_pen_color(color::blue); const double dirboy = direction_from_to_in_degrees(boyx, boyy, treex, treey); draw_point(boyx, boyy); set_heading_degrees(dirboy); draw_distance(50); set_pen_color(color::red); draw_point(bullx, bully); const double dirbull = direction_from_to_in_degrees(bullx, bully, boyx, boyy); set_heading_degrees(dirbull); draw_distance(50); }