diff options
Diffstat (limited to 'Week4/src/week4/Week4.java')
-rw-r--r-- | Week4/src/week4/Week4.java | 29 |
1 files changed, 20 insertions, 9 deletions
diff --git a/Week4/src/week4/Week4.java b/Week4/src/week4/Week4.java index 039eddb..7bad2ce 100644 --- a/Week4/src/week4/Week4.java +++ b/Week4/src/week4/Week4.java @@ -1,25 +1,36 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ package week4; +import java.util.Scanner; +import oo15loipe.AsciiArt; import oo15loipe.Loipe; +import oo15loipe.LoipePlaatje; /** - * - * @author cstaps + * Solutions for assignment 4 + * + * @author Thijs Heijligenberg, s4451414, Camil Staps, s4498062 */ public class Week4 { /** - * @param args the command line arguments + * Create a Loipe, draw it using LoipePlaatje and AsciiArt + * + * @param args the command line arguments (are ignored) */ public static void main(String[] args) { - Loipe l = new Loipe("ssrrsllrs"); + Scanner sc = new Scanner(System.in); + + Loipe l = new Loipe("srssrsslsllsss"); System.out.println(l.getWidth() + " x " + l.getHeight()); System.out.println(l); + LoipePlaatje lp = new LoipePlaatje(l); + lp.teken(); + AsciiArt aa = new AsciiArt(l); + do { + aa.setPosition(l.stap()); + aa.teken(); + } while (sc.nextLine() != null); + } } |