Google Blogoscoped

Forum

[Android code]

disha arora [PersonRank 0]

Tuesday, June 9, 2009
15 years ago2,613 views

can anybody plz help me wid the following code of lunar lander..n tell me how to run it..
package com.google.android.lunarlander;

import android.content.Context;
import android.content.Resources;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.RectF;
import android.graphics.drawable.Drawable;
import android.view.KeyEvant;
import android.util.AttributeSet;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;
import java.util.Map;

class LunarView extends View {

   public static final int READY = 0;
   public static final int RUNNING = 1;
   public static final int PAUSE =2;
   public static final int LOSE = 3;
   public static final int WIN = 4;

   public static final int EASY = 0;
   public static final int MEDIUM =1;
   public static final int HARD = 2;

   //Parameters for how the physics works.

   public static final int FIRE_ACCEL_SEC = 80 ;
   public static final int DOWN_ACCEL_SEC = 35 ;
   public static final int FUEL_SEC = 10 ;

[snip]

Philipp Lenssen [PersonRank 10]

15 years ago #

(I've snipped your post, could you please point to or upload the full code somewhere? This forum isn't too good for posting full code, due to line breaks being added etc...)

James Xuan [PersonRank 10]

15 years ago #

http://pastebay.com/ is a good place to start.

Tony Ruscoe [PersonRank 10]

15 years ago #

Here's the complete sample code:
http://developer.android.com/guide/samples/LunarLander/index.html

This might help:
http://en.androidwiki.com/wiki/Using_the_Android_SDK_tools

Forum home

Advertisement

 
Blog  |  Forum     more >> Archive | Feed | Google's blogs | About
Advertisement

 

This site unofficially covers Google™ and more with some rights reserved. Join our forum!