aboutsummaryrefslogtreecommitdiff
path: root/Week4/src/oo15loipe/AsciiArt.java
diff options
context:
space:
mode:
authorCamil Staps2015-04-18 13:44:44 +0200
committerCamil Staps2015-04-18 13:44:44 +0200
commit6a44b074f0169a1b0f9e92347af929c5e471746e (patch)
treeae5663fe7c69881bf4ecfedbef99c2505f8ec964 /Week4/src/oo15loipe/AsciiArt.java
parentAdded copyright to docs (diff)
Reorganised projects
Diffstat (limited to 'Week4/src/oo15loipe/AsciiArt.java')
-rw-r--r--Week4/src/oo15loipe/AsciiArt.java51
1 files changed, 0 insertions, 51 deletions
diff --git a/Week4/src/oo15loipe/AsciiArt.java b/Week4/src/oo15loipe/AsciiArt.java
deleted file mode 100644
index 4072d54..0000000
--- a/Week4/src/oo15loipe/AsciiArt.java
+++ /dev/null
@@ -1,51 +0,0 @@
-package oo15loipe;
-
-/**
- * A class that draws the loipe as ascii-art.
- *
- * @author Thijs Heijligenberg, s4451414, Camil Staps, s4498062
- */
-public class AsciiArt implements TekenLoipe{
- private InfoLoipe L;
- private Punt man;
-
- /**
- * Create the instance based on a loipe
- *
- * @param s
- */
- public AsciiArt(InfoLoipe s){
- this.L = s;
- this.man = new Punt(null);
- }
-
- @Override
- public void setPosition(Punt p){
- this.man = p;
- }
-
- @Override
- public void teken(){
- for(int j = 0; j < L.getHeight(); j++){
- for(int i = 0; i < L.getWidth(); i++){
- Fragment f = L.getFragment(i,j);
- if(i == man.getX() && j == man.getY()){
- System.out.print('*');
- } else if (f == null) {
- System.out.print(' ');
- } else {
- switch (f){
- case KR: System.out.print('+'); break;
- case NZ: System.out.print('|'); break;
- case OW: System.out.print('-'); break;
- case NO: System.out.print('`'); break;
- case NW: System.out.print(','); break;
- case ZO: System.out.print(','); break;
- case ZW: System.out.print('.'); break;
- }
- }
- }
- System.out.print("\n");
- }
- }
-}