author | waspe <waspe> | 2003-11-03 18:28:50 (UTC) |
---|---|---|
committer | waspe <waspe> | 2003-11-03 18:28:50 (UTC) |
commit | 87a9d6badcf518ffd14559ef886ff7729b63b73b (patch) (unidiff) | |
tree | 05af57bcebb8a124c2561336e4ff3dfdd52aeccb /noncore/games/tictac/main.cpp | |
parent | 9ce566fd5b280622670cf7b0e158f9d9c54e6e9a (diff) | |
download | opie-87a9d6badcf518ffd14559ef886ff7729b63b73b.zip opie-87a9d6badcf518ffd14559ef886ff7729b63b73b.tar.gz opie-87a9d6badcf518ffd14559ef886ff7729b63b73b.tar.bz2 |
resolved merge conflict
-rw-r--r-- | noncore/games/tictac/main.cpp | 24 |
1 files changed, 6 insertions, 18 deletions
diff --git a/noncore/games/tictac/main.cpp b/noncore/games/tictac/main.cpp index 78fb3b7..0185b8c 100644 --- a/noncore/games/tictac/main.cpp +++ b/noncore/games/tictac/main.cpp | |||
@@ -1,31 +1,19 @@ | |||
1 | /**************************************************************************** | 1 | /**************************************************************************** |
2 | <<<<<<< main.cpp | ||
2 | ** $Id$ | 3 | ** $Id$ |
4 | ======= | ||
5 | ** $Id$ | ||
6 | >>>>>>> 1.1.8.1.2.1 | ||
3 | ** | 7 | ** |
4 | ** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. | 8 | ** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. |
5 | ** | 9 | ** |
6 | ** This file is part of an example program for Qt. This example | 10 | ** This file is part of an example program for Qt. This example |
7 | ** program may be used, distributed and modified without limitation. | 11 | ** program may be used, distributed and modified without limitation. |
8 | ** | 12 | ** |
9 | *****************************************************************************/ | 13 | *****************************************************************************/ |
10 | 14 | ||
11 | #include <qpe/qpeapplication.h> | 15 | #include <qpe/qpeapplication.h> |
12 | #include <stdlib.h> | 16 | #include <opie/oapplicationfactory.h> |
13 | #include "tictac.h" | 17 | #include "tictac.h" |
14 | 18 | ||
15 | 19 | OPIE_EXPORT_APP( OApplicationFactory<TicTacToe> ) | |
16 | int main( int argc, char **argv ) | ||
17 | { | ||
18 | QPEApplication a( argc, argv ); | ||
19 | int n = 3; | ||
20 | if ( argc == 2 ) // get board size n | ||
21 | n = atoi(argv[1]); | ||
22 | if ( n < 3 || n > 10 ) { // out of range | ||
23 | qWarning( "%s: Board size must be from 3x3 to 10x10", argv[0] ); | ||
24 | return 1; | ||
25 | } | ||
26 | TicTacToe ttt( n ); // create game | ||
27 | a.setMainWidget( &ttt ); | ||
28 | ttt.setCaption( QObject::tr("TicTac") ); | ||
29 | ttt.show(); // show widget | ||
30 | return a.exec(); // go | ||
31 | } | ||