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 "BlockChooser.hpp" 20 21 #include <cstdlib> //random 22 23 namespace Bastet{ 24 BlockChooser()25 BlockChooser::BlockChooser(){} ~BlockChooser()26 BlockChooser::~BlockChooser(){} 27 RandomBlockChooser()28 RandomBlockChooser::RandomBlockChooser(){} ~RandomBlockChooser()29 RandomBlockChooser::~RandomBlockChooser(){} 30 GetStartingQueue()31 Queue RandomBlockChooser::GetStartingQueue(){ 32 Queue q; 33 q.push_back(BlockType(random()%nBlockTypes)); 34 q.push_back(BlockType(random()%nBlockTypes)); 35 return q; 36 } 37 GetNext(const Well * well,const Queue & q)38 BlockType RandomBlockChooser::GetNext(const Well *well, const Queue &q){ 39 return BlockType(random()%nBlockTypes); 40 } 41 42 } 43