Advertisement
CSenshi

robot.java

Oct 18th, 2021
1,159
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.63 KB | None | 0 0
  1. package s06;
  2.  
  3. import acm.graphics.GLabel;
  4. import acm.graphics.GLine;
  5. import acm.graphics.GOval;
  6. import acm.graphics.GRect;
  7. import acm.program.GraphicsProgram;
  8. import stanford.karel.*;
  9.  
  10. /*
  11.  * დახატეთ რობოტის სახე ფანჯრის ცენტრში.
  12.  */
  13. public class Ex14 extends GraphicsProgram {
  14.  
  15.     /* Face Parameters */
  16.     private int FACE_HEIGHT = 400;
  17.     private int FACE_WIDTH = 450;
  18.  
  19.     /* Mouth Parameters */
  20.     private int MOUTH_HEIGHT = 50;
  21.     private int MOUTH_WIDTH = 250;
  22.     private int MOUTH_OFFSET_FROM_BOTTOM = 30;
  23.     private int MOUTH_TEETH_COUNT = 10;
  24.  
  25.     /* Nose Parameters */
  26.     private int NOSE_HEIGHT = 150;
  27.     private int NOSE_WIDTH = 125;
  28.     private int NOSE_OFFSET_FROM_BOTTOM = 125;
  29.  
  30.     /* Ear Parameters */
  31.     private int EAR_HEIGHT = 150;
  32.     private int EAR_WIDTH = 50;
  33.  
  34.     /* Anteana Parameters */
  35.     private int ANTENA_HEIGHT = 100;
  36.     private int ANTENA_CIRCLE_R = 25;
  37.  
  38.     /* Eye Parameters */
  39.     private int EYE_HEIGHT = 120;
  40.     private int EYE_WIDTH = 120;
  41.     private int EYE_OFFSET_FROM_CENTER = 70;
  42.     private int EYE_OFFSET_FROM_TOP = 50;
  43.  
  44.     /* Canvas Parameters */
  45.     private int HEIGHT = 800;
  46.     private int WIDTH = 1000;
  47.  
  48.     @Override
  49.     public void run() {
  50.         // Set Canvas Size
  51.         this.setSize(WIDTH, HEIGHT);
  52.  
  53.         drawRobot();
  54.     }
  55.  
  56.     private void drawRobot() {
  57.         drawFaceOutline();
  58.         drawMouth();
  59.         drawEyes();
  60.         drawEars();
  61.         drawNose();
  62.         drawAntena();
  63.     }
  64.  
  65.     private void drawFaceOutline() {
  66.     }
  67.  
  68.     private void drawEyes() {
  69.     }
  70.  
  71.     private void drawMouth() {
  72.     }
  73.  
  74.     private void drawNose() {
  75.     }
  76.  
  77.     private void drawAntena() {
  78.     }
  79.  
  80.     private void drawEars() {
  81.     }
  82.  
  83. }
  84.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement