Class Main

java.lang.Object
java.awt.Component
java.awt.Canvas
miniGame.game_2048.Main
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.lang.Runnable, javax.accessibility.Accessible

public class Main
extends java.awt.Canvas
implements java.lang.Runnable
메인 페이지의 크기 설정값들 및 프레임 크기를 설정해준곳입니다.
See Also:
Serialized Form
  • Nested Class Summary

    Nested classes/interfaces inherited from class java.awt.Canvas

    java.awt.Canvas.AccessibleAWTCanvas

    Nested classes/interfaces inherited from class java.awt.Component

    java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
  • Field Summary

    Fields
    Modifier and Type Field Description
    javax.swing.JFrame frame  
    Game game  
    static int HEIGHT  
    static java.awt.image.BufferedImage image  
    Keyboard key  
    static int[] pixels  
    boolean running  
    static int scale  
    java.lang.Thread thread  
    static int WIDTH  

    Fields inherited from class java.awt.Component

    accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT

    Fields inherited from interface java.awt.image.ImageObserver

    ABORT, ALLBITS, ERROR, FRAMEBITS, PROPERTIES, SOMEBITS
  • Constructor Summary

    Constructors
    Constructor Description
    Main()  
  • Method Summary

    Modifier and Type Method Description
    static void main​(java.lang.String[] args)  
    void render()
    게임 프레임의 크기의 칸들을 지정해준 값입니다.
    void run()
    실시간으로 프레임 값이 얼마나 도는지를 보여주는 곳입니다.
    void start()
    스레드가 돌수있도록 만들어준 값입니다.
    void stop()  
    void update()
    키가 정상 작동하는 것을 설명

    Methods inherited from class java.awt.Canvas

    addNotify, createBufferStrategy, createBufferStrategy, getAccessibleContext, getBufferStrategy, paint, update

    Methods inherited from class java.awt.Component

    action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAlignmentX, getAlignmentY, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMinimumSize, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusCycleRoot, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, paramString, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, processComponentEvent, processEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, revalidate, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFont, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setMixingCutoutShape, setName, setPreferredSize, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, validate

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • WIDTH

      public static final int WIDTH
      See Also:
      Constant Field Values
    • HEIGHT

      public static final int HEIGHT
      See Also:
      Constant Field Values
    • scale

      public static int scale
    • frame

      public javax.swing.JFrame frame
    • thread

      public java.lang.Thread thread
    • key

      public Keyboard key
    • game

      public Game game
    • running

      public boolean running
    • image

      public static java.awt.image.BufferedImage image
    • pixels

      public static int[] pixels
  • Constructor Details

    • Main

      public Main()
  • Method Details

    • start

      public void start()
      스레드가 돌수있도록 만들어준 값입니다.
    • stop

      public void stop()
    • run

      public void run()
      실시간으로 프레임 값이 얼마나 도는지를 보여주는 곳입니다.
      Specified by:
      run in interface java.lang.Runnable
    • update

      public void update()
      키가 정상 작동하는 것을 설명
    • render

      public void render()
      게임 프레임의 크기의 칸들을 지정해준 값입니다.
    • main

      public static void main​(java.lang.String[] args)