Skip to content

Instantly share code, notes, and snippets.

@jasongorman
Created March 29, 2019 09:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jasongorman/e8693b39914a3c85bea0ced2b0680a5c to your computer and use it in GitHub Desktop.
Save jasongorman/e8693b39914a3c85bea0ced2b0680a5c to your computer and use it in GitHub Desktop.
ref(Carpet) c;
ref(Room) r;
ref(CarpetQuote) q;
r :- new RectangularRoom(2.5, 2.5);
c :- new StandardCarpet(10.0, False);
q :- new CarpetQuote(r, c);
OutText("Quote for rectangular carpet (not rounded) = ");
OutFix(q.quote, 5, 10);
Outimage;
c :- new StandardCarpet(10.0, True);
q :- new CarpetQuote(r, c);
OutText("Quote for rectangular carpet (rounded to nearest sq m) = ");
OutFix(q.quote, 5, 10);
Outimage;
r :- new CircularRoom(2.5);
c :- new StandardCarpet(10.0, True);
q :- new CarpetQuote(r, c);
OutText("Quote for carpet for circular room (rounded to nearest sq m) = ");
OutFix(q.quote, 5, 10);
Outimage;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment