1 /* 2 Bastet - tetris clone with embedded bastard block chooser 3 (c) 2005-2009 Federico Poloni <f.polonithirtyseven@sns.it> minus 37 4 5 This program is free software: you can redistribute it and/or modify 6 it under the terms of the GNU General Public License as published by 7 the Free Software Foundation, either version 3 of the License, or 8 (at your option) any later version. 9 10 This program is distributed in the hope that it will be useful, 11 but WITHOUT ANY WARRANTY; without even the implied warranty of 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 GNU General Public License for more details. 14 15 You should have received a copy of the GNU General Public License 16 along with this program. If not, see <http://www.gnu.org/licenses/>. 17 */ 18 19 #include "Ui.hpp" 20 #include "Config.hpp" 21 #include "BastetBlockChooser.hpp" 22 #include <boost/assign.hpp> 23 24 //DBG 25 #include <iostream> 26 #include <boost/format.hpp> 27 28 using namespace Bastet; 29 using namespace std; 30 using namespace boost; 31 using namespace boost::assign; 32 33 main(int argc,char ** argv)34int main(int argc, char **argv){ 35 Ui ui; 36 while(1){ 37 38 int choice=ui.MenuDialog(list_of("Play! (normal version)")("Play! (harder version)")("View highscores")("Customize keys")("Quit")); 39 switch(choice){ 40 case 0:{ 41 //ui.ChooseLevel(); 42 BastetBlockChooser bc; 43 ui.Play(&bc); 44 ui.HandleHighScores(difficulty_normal); 45 ui.ShowHighScores(difficulty_normal); 46 } 47 break; 48 case 1:{ 49 //ui.ChooseLevel(); 50 NoPreviewBlockChooser bc; 51 ui.Play(&bc); 52 ui.HandleHighScores(difficulty_hard); 53 ui.ShowHighScores(difficulty_hard); 54 } 55 break; 56 case 2: 57 ui.ShowHighScores(difficulty_normal); 58 ui.ShowHighScores(difficulty_hard); 59 break; 60 case 3: 61 ui.CustomizeKeys(); 62 break; 63 case 4: 64 exit(0); 65 break; 66 } 67 } 68 } 69