examples/sfexamples/oandx/inc/oandxengine.h

00001 // 
00002 // Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
00003 // All rights reserved.
00004 // This component and the accompanying materials are made available
00005 // under the terms of the License "Eclipse Public License v1.0"
00006 // which accompanies this distribution, and is available
00007 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
00008 // 
00009 // Initial Contributors:
00010 // Nokia Corporation - initial contribution.
00011 // 
00012 // Contributors:
00013 // 
00014 // Description:
00015 // 
00016 
00017 #ifndef OANDXENGINE_H
00018 #define OANDXENGINE_H
00019 
00020 #include <s32std.h>
00021 
00022 #include "oandxdefs.h"
00023 
00024 class COandXEngine : public CBase
00030         {
00031 public:
00032         static COandXEngine* NewL();
00033         virtual ~COandXEngine();
00034         
00035         // reset
00036         void Reset();
00037         
00038         // game logic
00039         TTileState TileStatus(TInt aIndex) const;
00040         TBool TryMakeMove(TInt aIndex, TBool aCrossTurn);
00041         TTileState GameWonBy() const;
00042         
00043         // persistence
00044         void ExternalizeL(RWriteStream& aStream) const;
00045         void InternalizeL(RReadStream& aStream);
00046         
00047 private:
00048         COandXEngine();
00049         
00050         TInt TileState(TInt aX, TInt aY) const;
00051 
00052 private:
00057         TFixedArray<TTileState, KNumberOfTiles> iTileStates;
00058         };
00059 
00060 #endif // OANDXENGINE_H

Generated by  doxygen 1.6.2