~ubuntu-branches/ubuntu/saucy/knavalbattle/saucy

« back to all changes in this revision

Viewing changes to src/controller.cpp

  • Committer: Package Import Robot
  • Author(s): Rohan Garg
  • Date: 2013-06-21 01:26:13 UTC
  • mfrom: (1.2.3)
  • Revision ID: package-import@ubuntu.com-20130621012613-jqw7rt4tgztybonr
Tags: 4:4.10.80-0ubuntu1
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
#include "shot.h"
18
18
#include "audioplayer.h"
19
19
 
20
 
Controller::Controller(QObject* parent, AudioPlayer* player)
 
20
Controller::Controller(QObject* parent, AudioPlayer* player, const bool allow_adjacent_ships)
21
21
: QObject(parent)
22
22
, m_shot(0)
23
23
, m_ready(0)
24
24
, m_player(player)
25
25
, m_has_ai(false)
 
26
, m_allow_adjacent_ships(allow_adjacent_ships)
26
27
{
27
28
    m_ui = 0;
28
 
    m_sea = new Sea(this, Coord(10, 10));
 
29
    m_sea = new Sea(this, Coord(10, 10), allow_adjacent_ships);
29
30
}
30
31
 
31
32
PlayerEntity* Controller::createPlayer(Sea::Player player, SeaView* view,