Changeset a0f5455 in advance-wars for src/com/example


Ignore:
Timestamp:
Jan 30, 2011, 10:13:45 PM (14 years ago)
Author:
aluthra <devnull@…>
Branches:
master
Children:
15ddb57, 7f693b4
Parents:
205f525
Message:

Created the game package and started creating actual game objects.

Location:
src/com/example
Files:
2 added
1 edited

Legend:

Unmodified
Added
Removed
  • src/com/example/advancewars/Tile.java

    r205f525 ra0f5455  
    11package com.example.advancewars;
     2
     3import com.example.game.Unit;
    24
    35import android.graphics.Canvas;
    46import android.graphics.Color;
    57import android.graphics.Paint;
     8import android.graphics.Point;
    69
    710public class Tile {
     11        public enum TerrainType
     12        {
     13                LAND, SEA
     14        }
     15       
     16        TerrainType type;
     17        public double moveCoefficent;
     18        public Unit currentUnit;
     19        public Point point;
     20       
     21        public void addUnit(Unit unit)
     22        {
     23                currentUnit = unit;     
     24        }
     25       
     26        public void removeUnit(Unit unit)
     27        {
     28                if(currentUnit != null)
     29                {
     30                        currentUnit = null;
     31                }
     32       
     33        }
    834        private Paint p;
    935       
Note: See TracChangeset for help on using the changeset viewer.