// // tests.cpp // cards-proof // // Created by Ethan Miller on 3/21/12. // #include #include "tests.h" #include "card.h" #include "Cost.h" #include "zone.h" #include "util.h" #include "player.h" using namespace std; void test_deck() { zone d; for ( int i = 0; i < 4000; ++i ) { to_str(i); d.add(card(to_str(i)), 1); } cout << "Shuffling...\n"; d.shuffle(); d.print(); cout << "Done.\n"; } void test_manacost() { cout << "\nTesting string constructor\n"; cost m("B75RRUE"); cout << "Colorless: " << m.get('n') << endl; cout << "Red: " << m.get('r') << endl; cout << "Blue: " << m.get('u') << endl; cout << "Black: " << m.get('b') << endl; cout << "E: " << m.get('e') << endl; cout << "\nTesting to_str()\n"; cout << m.to_str(); } void test_player() { player player1("John"); player player2("Lily", 25); cout << player1.life() << endl; player1.life() = 7; cout << player1.life() << endl; cout << player2.life() << endl; }