Changeset 1a1e8c7 in advance-wars for src/com/medievaltech/game/Map.java


Ignore:
Timestamp:
Jan 31, 2011, 11:44:53 PM (14 years ago)
Author:
dportnoy <devnull@…>
Branches:
master
Children:
00c432c
Parents:
abe7b3d
Message:

Added a basic draw function to Unit and made some other minor code changes.

File:
1 moved

Legend:

Unmodified
Added
Removed
  • src/com/medievaltech/game/Map.java

    rabe7b3d r1a1e8c7  
    1 package com.medievaltech.advancewars;
     1package com.medievaltech.game;
    22
    33import android.graphics.Canvas;
     
    1616                for(int x=0; x<getWidth(); x++)
    1717                        for(int y=0; y<getHeight(); y++)
    18                                 grid[x][y] = t;
     18                                grid[x][y] = new Tile(t);
    1919        }
    2020       
     
    2525        public int getHeight() {
    2626                return grid[0].length;
     27        }
     28       
     29        public Tile getTile(int x, int y) {
     30                return grid[x][y];
     31        }
     32       
     33        public Tile getTile(Point point) {
     34                return grid[point.x][point.y];
    2735        }
    2836       
     
    3644                                grid[x][y].draw(c, xStart+50*x, yStart+50*y);
    3745        }
    38        
    39         public Tile getTile(Point point)
    40         {
    41                 return grid[point.x][point.y];
    42         }
    4346}
Note: See TracChangeset for help on using the changeset viewer.