1 /* 2 * Copyright 2008, Ralf Schülke, teammaui@web.de. All rights reserved. 3 * Distributed under the terms of the MIT License. 4 */ 5 #ifndef PAIRS_VIEW_H 6 #define PAIRS_VIEW_H 7 8 9 #include <View.h> 10 11 12 class TopButton; 13 14 class PairsView : public BView { 15 public: 16 PairsView(BRect frame, const char* name, 17 uint32 resizingMode); 18 19 virtual ~PairsView(); 20 virtual void AttachedToWindow(); 21 virtual void Draw(BRect updateRect); 22 virtual void CreateGameBoard(); 23 24 TopButton* fDeckCard[16]; 25 int GetIconFromPos(int pos); 26 27 private: 28 void _SetPairsBoard(); 29 void _ReadRandomIcons(); 30 void _GenerateCardPos(); 31 32 BMessage* fButtonMessage; 33 BBitmap* fCard[8]; 34 int fRandPos[16]; 35 int fPosX[16]; 36 int fPosY[16]; 37 }; 38 39 40 #endif // PAIRS_VIEW_H 41