Write code of game:Dots_boxes
-
wrote on 7 May 2014, 16:37 last edited by
my mainwindow.h:
@
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include<QPushButton>
#include <QMainWindow>
#include <QSpinBox>
namespace Ui {
class MainWindow;
}class MainWindow : public QMainWindow
{
Q_OBJECT
public:
explicit MainWindow(QWidget *parent = 0);
~MainWindow();
private:
Ui::MainWindow *ui;
QPushButton **line;private slots:
};
#endif // MAINWINDOW_H
@my mainwindow.cpp:
@
#include "mainwindow.h"
#include "ui_mainwindow.h"MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
ui->setupUi(this);for(int t=0;t<11;t++) { for(int i=0;i<10;i++) { line[i]=new QPushButton("h",this); line[i]->setGeometry(i*40,t*40,50,10); } } for(int t=0;t<10;t++) { for(int i=0;i<11;i++) { line[i]=new QPushButton("v",this); line[i]->setGeometry(i*40,t*40,10,50); } }
}
MainWindow::~MainWindow()
{
delete ui;
}
@my main.cpp:
@
#include "mainwindow.h"
#include <QApplication>int main(int argc, char *argv[])
{
QApplication a(argc, argv);
MainWindow w;
w.showMaximized();return a.exec();
}
@
==> we must have two player that clicke in every time on one pushbutton :if player 1->color pushbutton red:if
player 2->color pushbutton blue.
if four pushbutton in triangle color-->last player's clicke add one his score!
every one that must score -->winner in game
I want you help me and complete this code![andreyc EDIT]: Added @ around the code and moved it to Jobs forum
-
wrote on 7 May 2014, 17:46 last edited by
Could you explain more clearer your goals?
Do you want learn how to write code or you want somebody who write code for you and this is a job offer? -
Looks like a follow-up of "this":https://qt-project.org/forums/viewthread/42234/
-
wrote on 7 May 2014, 23:12 last edited by
i want somebody who write code for me
-
wrote on 8 May 2014, 06:03 last edited by
[quote author="ahmadreza" date="1399504325"]i want somebody who write code for me[/quote]
Sure, I can do that as a job. My commercial rates are quite reasonable. When would you need it?
-
wrote on 8 May 2014, 11:05 last edited by
i must write it until tomorrow.
-
wrote on 8 May 2014, 11:06 last edited by
I am student and must write it until tomorrow
-
wrote on 8 May 2014, 11:15 last edited by
I guessed as much: a homework assignment. I guess that also means that you're not willing to shell out about 1000€ for it either. Anyway, I can't do it in that short a timeframe.
As this is homework, it is intended for you to learn from. Asking somebody else to do the work for you won't teach you anything. If it needs to be done tomorrow, you better get started, and order in a load of cola/red bull/coffee to keep you awake during the night...
-
wrote on 8 May 2014, 11:23 last edited by
oh,1000! i work with c++ many years but i never work with Qt,ithik this project is easy for you,if it was with c++,i write this code in 2 hours!
i try to write it,
please say me some site for help to write this project! -
wrote on 8 May 2014, 11:27 last edited by
Qt is C++, so what's your problem then? If it only takes you two hours, there's no need to worry for tomorrows deadline, is there?
The site you need, you have already found. There is excellent documentation to be found on Qt here, as well as lots of valuable FAQ articles, blog posts, and forum topics. What else do you need?
5/10