~ubuntu-branches/ubuntu/precise/kdegames/precise-proposed

« back to all changes in this revision

Viewing changes to konquest/map/map.h

  • Committer: Package Import Robot
  • Author(s): Jonathan Riddell
  • Date: 2012-01-05 12:18:19 UTC
  • mfrom: (1.3.16)
  • Revision ID: package-import@ubuntu.com-20120105121819-mwcqbvp42rbd7n8i
Tags: 4:4.7.97-0ubuntu1
New upstream release candidate

Show diffs side-by-side

added added

removed removed

Lines of Context:
58
58
    
59
59
    double     distance( Planet *p1, Planet *p2 );
60
60
 
61
 
    Sector *sector( Coordinate coord )  { return &m_grid[coord.y()][coord.x()]; }
 
61
    Sector *sector( Coordinate coord )
 
62
    {
 
63
        if (coord.y() >= 0 && coord.y() < m_grid.size())
 
64
        {
 
65
            if (coord.x() >= 0 && coord.x() < m_grid[coord.y()].size())
 
66
            {
 
67
                return &m_grid[coord.y()][coord.x()];
 
68
            }
 
69
        }
 
70
        return NULL;
 
71
    }
62
72
 
63
73
    QList<Planet*> planets();
64
74