From 9e9596097dc12fef069b9eea13a93d215ef70c91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20Payen=20de=20La=20Garanderie?= <gregoire.payendelagaranderie@telecom-bretagne.eu> Date: Sun, 16 Jan 2011 14:13:12 +0100 Subject: [PATCH] Ajout des cases bonus --- src/simul/table.cpp | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/simul/table.cpp b/src/simul/table.cpp index 09d293ab..9669dd45 100644 --- a/src/simul/table.cpp +++ b/src/simul/table.cpp @@ -81,6 +81,16 @@ void Table::update(int dt) repaint(); } +QPoint getCase(unsigned int i, unsigned int j) +{ + return QPoint(450 + i*350, j*350); +} + +QPoint getCaseCenter(unsigned int i, unsigned int j) +{ + return QPoint(625 + i*350, 175 + j*350); +} + void Table::paintEvent(QPaintEvent* evt) { static float l = 0; @@ -115,6 +125,17 @@ void Table::paintEvent(QPaintEvent* evt) p.fillRect(1128,1850,22,130,Qt::black); p.fillRect(2528,1850,22,130,Qt::black); + //Extra-points + p.setBrush(QBrush(QColor(30,30,30))); + p.setPen(QBrush(QColor(30,30,30))); + + p.drawEllipse(getCaseCenter(1,1), 50,50); + p.drawEllipse(getCaseCenter(1,4), 50,50); + p.drawEllipse(getCaseCenter(4,4), 50,50); + p.drawEllipse(getCaseCenter(4,1), 50,50); + + p.drawEllipse(getCaseCenter(2,5), 50,50); + p.drawEllipse(getCaseCenter(3,5), 50,50); p.setBrush(QBrush(QColor("yellow"))); p.setPen(QBrush(QColor("yellow"))); -- GitLab