[배재대] 모바일 프로그래밍 1학기 과제
- 최초 등록일
- 2023.04.07
- 최종 저작일
- 2018.04
- 17페이지/ 한컴오피스
- 가격 1,000원
소개글
"[배재대] 모바일 프로그래밍 과제 스네이크"에 대한 내용입니다.
목차
1. Snake(java)
2. snake_layout(xml)
3. SnakeView(java)
4. TileView(java)
본문내용
package com.example.android.snake;
import android.app.Activity;
import android.os.Bundle;
import android.view.Window;
import android.widget.TextView;
/**
* Snake: a simple game that everyone can enjoy.
*
* This is an implementation of the classic Game "Snake", in which you control a
* serpent roaming around the garden looking for apples. Be careful, though,
* because when you catch one, not only will you become longer, but you'll move
* faster. Running into yourself or the walls will end the game.
*
*/
public class Snake extends Activity {
private SnakeView mSnakeView;
private static String ICICLE_KEY = "snake-view";
/**
* Called when Activity is first created. Turns off the title bar, sets up
* the content views, and fires up the SnakeView.
*
*/
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.snake_layout);
참고 자료
없음