1/* 2 * Copyright 2007-2011, Axel Dörfler, axeld@pinc-software.de. 3 * Distributed under the terms of the MIT License. 4 */ 5 6 7#include "Sudoku.h" 8 9#include "SudokuWindow.h" 10 11#include <stdlib.h> 12 13#include <Alert.h> 14#include <Application.h> 15#include <Catalog.h> 16#include <TextView.h> 17 18 19#undef B_TRANSLATION_CONTEXT 20#define B_TRANSLATION_CONTEXT "Sudoku" 21 22 23const char* kSignature = "application/x-vnd.Haiku-Sudoku"; 24 25 26Sudoku::Sudoku() 27 : 28 BApplication(kSignature) 29{ 30} 31 32 33Sudoku::~Sudoku() 34{ 35} 36 37 38void 39Sudoku::ReadyToRun() 40{ 41 fWindow = new SudokuWindow(); 42 fWindow->Show(); 43} 44 45 46void 47Sudoku::RefsReceived(BMessage* message) 48{ 49 fWindow->PostMessage(message); 50} 51 52 53void 54Sudoku::MessageReceived(BMessage* message) 55{ 56 BApplication::MessageReceived(message); 57} 58 59 60// #pragma mark - 61 62 63int 64main(int /*argc*/, char** /*argv*/) 65{ 66 srand(system_time() % INT_MAX); 67 68 Sudoku sudoku; 69 sudoku.Run(); 70 71 return 0; 72} 73